Use of the expoting parameter of the highcharts report plug-in

Source: Internet
Author: User

Exporting parameter configuration

Description: Export and Print Options

Print the configuration items of the export function.

1. Buttons: Print and export button settings. There are many style settings in the two buttons, as shown below:

(1) exportbutton: Export button style

(11) hoversymbolfill: move the mouse up to change the color of the button arrow, string type, default value: # 768f3e.

(12) onclick: Click the export report button. Generally, the event is used together with menuitems.

(13) menuitems: the setting option of the drop-down list that appears when you click the export button. It is generally used together with onclick, which is of the array type.

Instance 1 is as follows:

      exporting : {              enabled : true,              buttons : {                     exportButton : {                            menuItems: null,                            onclick: function(){                                   this.exportChart();                            }                     },                     printButton: {                            enabled : false                     }              }       }

When you click the button, the drop-down box is not displayed, but the report image is exported directly.

Instance 2 is as follows:

Exporting: {enabled: True, buttons: {exportbutton: {menuitems: [{text: 'export PNG Image (width: 250px) ', onclick: function () {This. exportchart ({width: 200 // width of the exported report}) ;},{ text: 'export PNG Image (width: 800px) ', onclick: function () {This. exportchart (); // 800px by default }}, null, null]}, printbutton: {enabled: false }}}

The drop-down title set by yourself and the size of the exported image are displayed.

(14) Symbol: The symbol button. The point definition function is available in the highcharts. Renderer. symbols set. String type. The default value is "exporticon ". The optional values of symbol include 'circle', 'Diamond ', 'exporticon', 'printicon ', and 'square ',
The following figure shows the corresponding images of 'angle 'and 'angle-down:


(15) symbolfill: Specifies the background color of the symbol, which belongs to the string type. The default value is # a8bf77.

(16) X: a positive or negative value can be used relative to its own horizontal position. It is of the number type and the default value is 10.

(17) Align: horizontal position in the report, which belongs to the string type. Optional values include "Left", "center", and "right". The default value is "right"

(18) backgroundcolor: Specifies the background color of the report export image button, for example:

             backgroundColor:{                     linearGradient:[0, 0, 0, 20],                     stops:[                            [0.1,'#ff0000'],                            [0.9,'#00ff00']                     ]              }

Default Value:

              backgroundColor:{                     linearGradient:[0, 0, 0, 20],                     stops:[                            [0.4,'#F7F7F7'],                            [0.6,'#E3E3E3']                     ]              }

(19) bordercolor: The border color of the report export button. It is of the string type and the default value is # b0b0b0.

(20) borderradius: indicates the smoothness of the border of the report export button, which is of the number type. The default value is 3.

(21) borderwidth: Border width of the report export button, number type, default value: 1

(22) Enabled: whether the report export button is enabled, Boolean Type, default value: True

(23) Height: the height of the report export button. The value belongs to the number type. The default value is 20.

(24) hoverbordercolor: border color when the mouse goes through the report export button. It is of the string type and the default value is #909090.

(25) hoversymbolstroke: Specifies the border color of the arrow in the middle of the export button after the mouse goes through the report. It is of the string type. The default value is #4572a5.

(26) symbolsize: the size of the arrow in the middle of the report export button. It is of the number type and the default value is 12.

(27) symbolstroke: border color of the arrow in the middle of the report export button, string type, default value: # a0a0a0

(28) symbolstrokewidth: Border width of the arrow in the middle of the report export button, number type, default value: 1

(29) symbolx: horizontal position of the arrow in the middle of the report export button, number type, default value: 11.5

(30) symboly: vertical position of the arrow in the middle of the report export button, number type, default value: 10.5

(31) verticalalign: vertical alignment of the report export button, which belongs to the string type. The options are "TOP", "Middle", or "bottom". The default value is "TOP"

(32) width: the width of the export button in the report. The default value is 24.

(33) Y: the positive and negative values are acceptable relative to the vertical position. The default value is 10. It is of the number type.


(2) printbutton: print button style

(11) hoversymbolfill: move the mouse up to change the color of the button arrow, string type, default value: # 768f3e.

(12) onclick: Click the report print button. Generally, the event is used together with menuitems.

(13) menuitems: the setting option of the drop-down list that appears when you click the print button. It is generally used together with onclick, which is of the array type.

Instance 1 is as follows:

        exporting: {              enabled: true,              buttons: {                     exportButton: {                            menuItems:null,                            onclick:function() {                                   this.exportChart();                            }                     },                     printButton:{                            enabled: false                     }              }       }

When you click the button, the drop-down box is not displayed, but the report image is exported directly.

Instance 2 is as follows:

Exporting: {enabled: True, buttons: {exportbutton: {menuitems: [{text: 'export PNG Image (width: 250px) ', onclick: function () {This. exportchart ({width: 200 // width of the exported report}) ;},{ text: 'export PNG Image (width: 800px) ', onclick: function () {This. exportchart (); // 800px by default }}, null, null]}, printbutton: {enabled: false }}}

The drop-down title set by yourself and the size of the exported image are displayed.

(14) Symbol: The symbol button. The point definition function is available in the highcharts. Renderer. symbols set. String type. The default value is "exporticon ". The optional values of symbol include 'circle', 'Diamond ', 'exporticon', 'printicon ', and 'square ',
'Angle 'and 'angle-low'

(15) symbolfill: Specifies the background color of the symbol, which belongs to the string type. The default value is # a8bf77.

(16) X: a positive or negative value can be used relative to its own horizontal position. It is of the number type and the default value is 10.

(17) Align: horizontal position in the report, which belongs to the string type. Optional values include "Left", "center", and "right". The default value is "right"

(18) backgroundcolor: Specifies the background color of the report print image button, for example:

              backgroundColor: {                     linearGradient: [0, 0, 0,20],                     stops: [                            [0.1, '#ff0000'],                            [0.9, '#00ff00']                     ]              }

Default Value:

              backgroundColor: {                     linearGradient: [0, 0, 0,20],                     stops: [                            [0.4, '#F7F7F7'],                            [0.6, '#E3E3E3']                     ]              }

(19) bordercolor: The border color of the report print button. It is of the string type and the default value is # b0b0b0.

(20) borderradius: indicates the smoothness of the border of the report printing button on four diagonal lines. It is of the number type and the default value is 3.

(21) borderwidth: The Border width of the report print button. It is of the number type and the default value is 1.

(22) Enabled: whether the report printing button is enabled. It is of the boolean type and the default value is true.

(23) Height: the height of the report printing button. The value belongs to the number type. The default value is 20.

(24) hoverbordercolor: Specifies the border color when the mouse goes through the report printing button. It is of the string type and the default value is #909090.

(25) hoversymbolstroke: Specifies the border color of the arrow in the middle of the report print button. It is of the string type. The default value is #4572a5.

(26) symbolsize: the size of the arrow in the middle of the report printing button. It is of the number type and the default value is 12.

(27) symbolstroke: border color of the arrow in the middle of the report printing button. It is of the string type and the default value is # a0a0a0.

(28) symbolstrokewidth: Border width of the arrow in the middle of the report printing button, number type, default value: 1

(29) symbolx: horizontal position of the arrow in the middle of the report printing button. It is of the number type and the default value is 11.5.

(30) symboly: vertical position of the arrow in the middle of the report printing button, number type, default value: 10.5

(31) verticalalign: vertical alignment of the report print button, which is of the string type. The optional values are "TOP", "Middle", and "bottom". The default value is "TOP"

(32) width: the width of the report print button. It is of the number type and the default value is 24.

(33) Y: the positive and negative values are acceptable relative to the vertical position. The default value is 10. It is of the number type.

2. Enabled: whether to display the button (that is, enable the print Export function), Boolean, true by default

3. filename: name of the exported report image, string type, default value chart, Chinese name is not supported

4. Type: If the type option is not specified when chart. exportchart () is called, the default MIME type is used.

The possible values are image/PNG, image/JPEG, application/pdf andimage/SVG + XML. The default value is "image/PNG ".

5. url: the server URL for converting images. The default is highcharts, which is a free network server. The default is http://export.highcharts.com.

6. Width: the size and number of the PNG or jpg image to be exported. Default Value: 800

Note: The ratio of width to height is. When setting width, it is best to set it to a multiple of 200. Otherwise, when setting it to a width of 100 or 300, the download time will be relatively long.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.