Class Exporting
- All Implemented Interfaces:
Serializable
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetError()
getScale()
getType()
getUrl()
getWidth()
void
setAllowHTML
(Boolean allowHTML) Experimental setting to allow HTML inside the chart (added through theuseHTML
options), directly in the exported image.void
setButtons
(Buttons buttons) Options for the export related buttons, print and export.void
setEnabled
(Boolean enabled) Whether to enable the exporting module.void
void
setFallbackToExportServer
(Boolean fallbackToExportServer) Whether or not to fall back to the export server if the offline-exporting module is unable to export the chart on the client side.void
setFilename
(String filename) The filename, without extension, to use for the exported chart.void
Path where Highcharts will look for export module dependencies to load on demand if they don't already exist onwindow
.void
setMenuItemDefinitions
(Map<String, ExportingMenuItemDefinition> menuItemDefinitions) An object consisting of definitions for the menu items in the context menu.void
setPrintMaxWidth
(Number printMaxWidth) When printing the chart from the menu item in the burger menu, if the on-screen chart exceeds this width, it is resized.void
Defines the scale or zoom factor for the exported image compared to the on-screen display.void
setSourceHeight
(Number sourceHeight) Analogous to sourceWidthvoid
setSourceWidth
(Number sourceWidth) The width of the original chart when exported, unless an explicit chart.width is set.void
setType
(ExportFileType type) Default MIME type for exporting ifchart.exportChart()
is called without specifying atype
option.void
The URL for the server module converting the SVG string to an image format.void
The pixel width of charts exported to PNG or JPG.
-
Constructor Details
-
Exporting
public Exporting() -
Exporting
-
-
Method Details
-
getAllowHTML
- See Also:
-
setAllowHTML
Experimental setting to allow HTML inside the chart (added through the
useHTML
options), directly in the exported image. This allows you to preserve complicated HTML structures like tables or bi-directional text in exported charts.Disclaimer: The HTML is rendered in a
foreignObject
tag in the generated SVG. The official export server is based on PhantomJS, which supports this, but other SVG clients, like Batik, does not support it. This also applies to downloaded SVG that you want to open in a desktop client.Defaults to: false
-
getButtons
- See Also:
-
setButtons
Options for the export related buttons, print and export. In addition to the default buttons listed here, custom buttons can be added. See navigation.buttonOptions for general options. -
getEnabled
- See Also:
-
setEnabled
Whether to enable the exporting module. Disabling the module will hide the context button, but API methods will still be available.Defaults to: true
-
getError
-
setError
-
getFallbackToExportServer
- See Also:
-
setFallbackToExportServer
Whether or not to fall back to the export server if the offline-exporting module is unable to export the chart on the client side.Defaults to: true
-
getFilename
- See Also:
-
setFilename
The filename, without extension, to use for the exported chart.Defaults to: chart
-
getLibURL
- See Also:
-
setLibURL
Path where Highcharts will look for export module dependencies to load on demand if they don't already exist onwindow
. Should currently point to location of CanVG library, RGBColor.js, jsPDF and svg2pdf.js, required for client side export in certain browsers.Defaults to: https://code.highcharts.com/{version}/lib
-
getMenuItemDefinitions
- See Also:
-
setMenuItemDefinitions
An object consisting of definitions for the menu items in the context menu. Each key value pair has a
key
that is referenced in the menuItems setting, and avalue
, which is an object with the following properties:- onclick
- The click handler for the menu item
- text
- The text for the menu item
- textKey
- If internationalization is required, the key to a language string
-
getPrintMaxWidth
- See Also:
-
setPrintMaxWidth
When printing the chart from the menu item in the burger menu, if the on-screen chart exceeds this width, it is resized. After printing or cancelled, it is restored. The default width makes the chart fit into typical paper format. Note that this does not affect the chart when printing the web page as a whole.Defaults to: 780
-
getScale
- See Also:
-
setScale
Defines the scale or zoom factor for the exported image compared to the on-screen display. While for instance a 600px wide chart may look good on a website, it will look bad in print. The default scale of 2 makes this chart export to a 1200px PNG or JPG.Defaults to: 2
-
getSourceHeight
- See Also:
-
setSourceHeight
Analogous to sourceWidth -
getSourceWidth
- See Also:
-
setSourceWidth
The width of the original chart when exported, unless an explicit chart.width is set. The width exported raster image is then multiplied by scale. -
getType
- See Also:
-
setType
Default MIME type for exporting ifchart.exportChart()
is called without specifying atype
option. Possible values areimage/png
,image/jpeg
,application/pdf
andimage/svg+xml
.Defaults to: image/png
-
getUrl
- See Also:
-
setUrl
The URL for the server module converting the SVG string to an image format. By default this points to Highchart's free web service.Defaults to: https://export.highcharts.com
-
getWidth
- See Also:
-
setWidth
The pixel width of charts exported to PNG or JPG. As of Highcharts 3.0, the default pixel width is a function of the chart.width or exporting.sourceWidth and the exporting.scale.Defaults to: undefined
-