Class Exporting
- All Implemented Interfaces:
Serializable
- Version:
- $Id: $Id
- Author:
- Vaadin
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for the fieldallowHTML.Getter for the fieldbuttons.Getter for the fieldenabled.Getter for the fieldfallbackToExportServer.Getter for the fieldfilename.Getter for the fieldprintMaxWidth.getScale()Getter for the fieldscale.Getter for the fieldsourceHeight.Getter for the fieldsourceWidth.getType()Getter for the fieldtype.getUrl()Getter for the fieldurl.getWidth()Getter for the fieldwidth.voidsetAllowHTML(Boolean allowHTML) Experimental setting to allow HTML inside the chart (added through theuseHTMLoptions), directly in the exported image.voidsetButtons(Buttons buttons) Options for the export related buttons, print and export.voidsetEnabled(Boolean enabled) Whether to enable the exporting module.voidsetFallbackToExportServer(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.voidsetFilename(String filename) The filename, without extension, to use for the exported chart.voidsetPrintMaxWidth(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.voidDefines the scale or zoom factor for the exported image compared to the on-screen display.voidsetSourceHeight(Number sourceHeight) Analogous to sourceWidthvoidsetSourceWidth(Number sourceWidth) The width of the original chart when exported, unless an explicit chart.width is set.voidDefault MIME type for exporting ifchart.exportChart()is called without specifying atypeoption.voidThe URL for the server module converting the SVG string to an image format.voidThe pixel width of charts exported to PNG or JPG.
-
Constructor Details
-
Exporting
public Exporting()Constructor for Exporting.
-
Exporting
Constructor for Exporting.
- Parameters:
enabled- aBooleanobject.
-
-
Method Details
-
getAllowHTML
Getter for the field
allowHTML.- Returns:
- a
Booleanobject. - See Also:
-
setAllowHTML
Experimental setting to allow HTML inside the chart (added through the
useHTMLoptions), 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
foreignObjecttag 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
- Parameters:
allowHTML- aBooleanobject.
-
getButtons
Getter for the field
buttons.- Returns:
- a
Buttonsobject. - 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.- Parameters:
buttons- aButtonsobject.
-
getEnabled
Getter for the field
enabled.- Returns:
- a
Booleanobject. - 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
- Parameters:
enabled- aBooleanobject.
-
getFallbackToExportServer
Getter for the field
fallbackToExportServer.- Returns:
- a
Booleanobject. - 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
- Parameters:
fallbackToExportServer- aBooleanobject.
-
getFilename
Getter for the field
filename.- Returns:
- a
Stringobject. - See Also:
-
setFilename
The filename, without extension, to use for the exported chart.Defaults to: chart
- Parameters:
filename- aStringobject.
-
getPrintMaxWidth
Getter for the field
printMaxWidth.- Returns:
- a
Numberobject. - 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
- Parameters:
printMaxWidth- aNumberobject.
-
getScale
Getter for the field
scale.- Returns:
- a
Numberobject. - 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
- Parameters:
scale- aNumberobject.
-
getSourceHeight
Getter for the field
sourceHeight.- Returns:
- a
Numberobject. - See Also:
-
setSourceHeight
Analogous to sourceWidth- Parameters:
sourceHeight- aNumberobject.
-
getSourceWidth
Getter for the field
sourceWidth.- Returns:
- a
Numberobject. - 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.- Parameters:
sourceWidth- aNumberobject.
-
getType
Getter for the field
type.- Returns:
- a
Stringobject. - See Also:
-
setType
Default MIME type for exporting ifchart.exportChart()is called without specifying atypeoption. Possible values areimage/png,image/jpeg,application/pdfandimage/svg+xml.Defaults to: image/png
- Parameters:
type- aStringobject.
-
getUrl
Getter for the field
url.- Returns:
- a
Stringobject. - 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: http://export.highcharts.com
- Parameters:
url- aStringobject.
-
getWidth
Getter for the field
width.- Returns:
- a
Numberobject. - 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
- Parameters:
width- aNumberobject.
-