public class HighchartRenderer extends Object
The HighchartRenderer 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.
HighchartRenderer renderer = new HighchartRenderer();
...
Highchart hc = new YourChart().configure();
globalOptionsJs = renderer.toJs(hc.getGlobalOptions()); // if required
chartOptionsJs = renderer.toJs(hc.getChartOptions());
Highchart hc2 = new YourChart2().configure();
globalOptionsJs = renderer.toJs(hc2.getGlobalOptions()); // if required
chartOptionsJs = renderer.toJs(hc2.getChartOptions());
....
Constructor and Description |
---|
HighchartRenderer() |
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.