Package overit.geocall.basic.ui.control
Class ChartScriptBuilder
java.lang.Object
overit.geocall.basic.ui.control.ChartScriptBuilder
This class is used to build the JavaScript code that is used to configure the chart.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddEventHandler(String configurationProperty, String eventCode) Adds an event handler to the chart.Builds the JavaScript code that is used to configure the chart.setChartId(String chartId) Sets the id of the chart.setJsonConfiguration(String jsonConfiguration) Sets the JSON configuration of the chart.
-
Constructor Details
-
ChartScriptBuilder
public ChartScriptBuilder()
-
-
Method Details
-
setChartId
Sets the id of the chart.- Parameters:
chartId- The id of the chart.- Returns:
- The ChartScriptBuilder.
-
addEventHandler
@Nonnull public ChartScriptBuilder addEventHandler(@Nonnull String configurationProperty, @Nonnull String eventCode) Adds an event handler to the chart.- Parameters:
configurationProperty- The name of the configuration property to which the event handler is added.eventCode- The JavaScript code of the event handler.- Returns:
- The ChartScriptBuilder.
-
setJsonConfiguration
Sets the JSON configuration of the chart.- Parameters:
jsonConfiguration- The JSON configuration of the chart.- Returns:
- The ChartScriptBuilder.
-
addPlugin
-
buildScript
Builds the JavaScript code that is used to configure the chart.- Returns:
- The JavaScript code that is used to configure the chart.
-