tùy chỉnh file export

author(s): Torstein Hønsi

by tin nguyen

HTML

<script src="http://code.highcharts.com/highcharts.js"></script>
<script src="http://code.highcharts.com/modules/exporting.js"></script>
<div id="container" style="margin-top: 1em"></div>

CSS

* {
    font-size: 8px;
}

JavaScript

var _userQueryKey = '24297820071';
 var _typeOfRequest = '25';
 var _typeOfRequestHighchartExport = '26';
 var _baseQuery = 'CaseTrademarkApplication';
 var _propertyTypeKey = ''
 var chart;
 var _serverData;
 var options = {
     chart: {
         renderTo: 'container',
         defaultSeriesType: 'column'
     },
     credits: {
         enabled: false
     },
     lang: {
         loading: 'Loading...'
     },
     title: {
         text: 'Query chart'
     },
     subtitle: {
         text: null
     },
     xAxis: {
         categories: ['Belarus', 'Belgium', 'Bulgaria', 'Czech Republic', 'European Union', 'Finland', 'France', 'Georgia', 'Germany', 'Greece', 'Hungary', 'India', 'Ireland', 'Italy', 'Japan', 'Norway', 'Poland', 'Portugal', 'Romania', 'Serbia (ex. SERBIA & MONTENEGRO)', 'Slovakia', 'Slovenia', 'Spain', 'Sweden', 'Switzerland', 'Turkey', 'Ukraine', 'United Kingdom', 'United States Of America'],
         labels: {
             rotation: -90,
             align: 'right'
         }
     },
     series: [{
         data: [16, 2, 18, 19, 14, 14, 295, 9, 50, 15, 22, 18, 23, 27, 19, 13, 21, 29, 17, 16, 20, 19, 35, 12, 27, 14, 18, 31, 31]
     }],
     tooltip: {
         hideDelay: 0
     },
     exporting: {
         filename: 'MyChart',
         width: 1920,
         buttons: {
             contextButton: {
                 menuItems: [{
                     text: 'Print chart',
                     onclick: function () {
                         this.print();
                     }
                 }, {
                     separator: true
                 }, {
                     text: 'Download PNG image',
                     onclick: function () {
                         this.exportChart({
                             type: 'image/png'
                         }, {
                             tooltip: {
                                 enabled: false
                             }
                         });
                     }
          ...