Class Exporting

All Implemented Interfaces:
Serializable

public class Exporting extends AbstractConfigurationObject
Options for the exporting module. For an overview on the matter, see the docs.
See Also:
  • Constructor Details

    • Exporting

      public Exporting()
    • Exporting

      public Exporting(Boolean enabled)
  • Method Details

    • getAllowHTML

      public Boolean getAllowHTML()
      See Also:
    • setAllowHTML

      public void setAllowHTML(Boolean allowHTML)

      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

      public Buttons getButtons()
      See Also:
    • setButtons

      public void setButtons(Buttons buttons)
      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

      public Boolean getEnabled()
      See Also:
    • setEnabled

      public void setEnabled(Boolean enabled)
      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

      public String getError()
    • setError

      public void setError(String _fn_error)
    • getFallbackToExportServer

      public Boolean getFallbackToExportServer()
      See Also:
    • setFallbackToExportServer

      public 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.

      Defaults to: true

    • getFilename

      public String getFilename()
      See Also:
    • setFilename

      public void setFilename(String filename)
      The filename, without extension, to use for the exported chart.

      Defaults to: chart

    • getLibURL

      public String getLibURL()
      See Also:
    • setLibURL

      public void setLibURL(String libURL)
      Path where Highcharts will look for export module dependencies to load on demand if they don't already exist on window. 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

      public Map<String,ExportingMenuItemDefinition> getMenuItemDefinitions()
      See Also:
    • setMenuItemDefinitions

      public void setMenuItemDefinitions(Map<String,ExportingMenuItemDefinition> menuItemDefinitions)

      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 a value, 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

      public Number getPrintMaxWidth()
      See Also:
    • setPrintMaxWidth

      public 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. 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

      public Number getScale()
      See Also:
    • setScale

      public void setScale(Number scale)
      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

      public Number getSourceHeight()
      See Also:
    • setSourceHeight

      public void setSourceHeight(Number sourceHeight)
      Analogous to sourceWidth
    • getSourceWidth

      public Number getSourceWidth()
      See Also:
    • setSourceWidth

      public void setSourceWidth(Number sourceWidth)
      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

      public ExportFileType getType()
      See Also:
    • setType

      public void setType(ExportFileType type)
      Default MIME type for exporting if chart.exportChart() is called without specifying a type option. Possible values are image/png, image/jpeg, application/pdf and image/svg+xml.

      Defaults to: image/png

    • getUrl

      public String getUrl()
      See Also:
    • setUrl

      public void setUrl(String url)
      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

      public Number getWidth()
      See Also:
    • setWidth

      public void setWidth(Number width)
      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