|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.moxieapps.gwt.highcharts.client.Configurable<Exporting>
org.moxieapps.gwt.highcharts.client.Exporting
public class Exporting
A configurable class that will allow you to control the options for exporting module. An instance of
this class can be constructed and then set on the chart via the
BaseChart.setExporting(Exporting)
method.
Nested Class Summary | |
---|---|
static class |
Exporting.Type
An enumeration of supported exporting file types, which can be passed to the setType(Exporting.Type) method. |
Constructor Summary | |
---|---|
Exporting()
|
Method Summary | |
---|---|
Exporting |
setContextButton(ContextButton contextButton)
Convenience method for directly setting the options for the context button. |
Exporting |
setEnabled(boolean enabled)
Convenience method for setting the 'enabled' option for the exporting module. |
Exporting |
setFilename(String fileName)
Convenience method for setting the 'filename' option for the exporting module. |
Exporting |
setScale(Number scale)
Convenience method for setting the 'scale' option for exporting module. |
Exporting |
setSourceHeight(Number sourceHeight)
Convenience method for setting the 'sourceHeight' option for the exporting module. |
Exporting |
setSourceWidth(Number sourceWidth)
Convenience method for setting the 'sourceWidth' option for the exporting module. |
Exporting |
setType(Exporting.Type type)
Convenience method for setting the 'type' option for the exporting module. |
Exporting |
setUrl(String url)
Convenience method for setting the 'url' option for the exporting module. |
Exporting |
setWidth(Number width)
Convenience method for setting the 'width' option for the exporting module. |
Methods inherited from class org.moxieapps.gwt.highcharts.client.Configurable |
---|
getOptions, setOption |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Exporting()
Method Detail |
---|
public Exporting setContextButton(ContextButton contextButton)
exporting.setOption("/buttons/contextButton/align", "right");
contextButton
- An instance of the ContextButton class
Exporting
instance for convenient method chaining.public Exporting setEnabled(boolean enabled)
exporting.setOption("enabled", true);
Whether to enable the exporting module. Defaults to true, but note that the exporting module
Javascript file must be included in the source of the page in order for the exporting
functionality to appear.
enabled
- Whether or not to enable or disable the exporting module for the chart.
Exporting
instance for convenient method chaining.public Exporting setFilename(String fileName)
exporting.setOption("filename", "chart");
The filename, without extension, to use for the exported chart. Defaults to "chart".
fileName
- The filename, without extension, to use for the exported chart.
Exporting
instance for convenient method chaining.public Exporting setScale(Number scale)
exporting.setOption("scale", 2)
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.
scale
- The scale to use for the exported chart.
Exporting
instance for convenient method chaining.public Exporting setSourceHeight(Number sourceHeight)
exporting.setOption("sourceHeight", 400);
The height of the original chart when exported, unless an explicit chart.height is set.
The height exported raster image is then multiplied by scale.
sourceHeight
- The height of the original chart to be used for exporting.
Exporting
instance for convenient method chaining.public Exporting setSourceWidth(Number sourceWidth)
exporting.setOption("sourceWidth", 600);
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.
sourceWidth
- The width of the original chart to be used for exporting.
Exporting
instance for convenient method chaining.public Exporting setType(Exporting.Type type)
exporting.setOption("type", "image/jpeg");
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".
type
- The default file format that exported charts should be created as.
Exporting
instance for convenient method chaining.public Exporting setUrl(String url)
exporting.setOption("url", "http://export.highcharts.com");
The URL for the server module converting the SVG string to an image format. By default this
points to Highslide Software's free web service. Defaults to http://export.highcharts.com.
url
- The URL for the server module converting the SVG string to an image format.
Exporting
instance for convenient method chaining.public Exporting setWidth(Number width)
exporting.setOption("width", 600);
The pixel width of charts exported to PNG or JPG. Defaults to 800.
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.
width
- The pixel width of charts exported to PNG or JPG.
Exporting
instance for convenient method chaining.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |