public class HighstockRenderer extends Object
The HighstockRenderer class can be used to generate Javascript for GlobalOptions and ChartOptions.
Some performance benefits can be found in cases where thousands of charts are being generated, for example in batch processes.
Usage: Instantiate this class once and then use it to generate the Javascript for multiple charts.
HighstockRenderer renderer = new HighstockRenderer();
...
Highstock hs = new YourChart().configure();
globalOptionsJs = renderer.toJs(hs.getGlobalOptions()); // if required
chartOptionsJs = renderer.toJs(hs.getChartOptions());
Highstock hs2 = new YourChart2().configure();
globalOptionsJs = renderer.toJs(hs2.getGlobalOptions()); // if required
chartOptionsJs = renderer.toJs(hs2.getChartOptions());
....
Constructor and Description |
---|
HighstockRenderer() |
Modifier and Type | Method and Description |
---|---|
String |
toJs(ChartOptions chartOptions)
Converts chart options to Javascript.
|
String |
toJs(GlobalOptions globalOptions)
Converts global options to Javascript.
|
public String toJs(GlobalOptions globalOptions)
globalOptions
- the global options object.public String toJs(ChartOptions chartOptions)
chartOptions
- the chart options object.Copyright © 2022. All rights reserved.