public class Highchart extends Object
The Highcharts class wraps both the GlobalOptions and ChartOptions classes into one convenient class to
make usage as simple as possible.
Handles chart theming; the setting of global and chart options; generates JSON for GlobalOptions, ChartOptions and any model class.
The GlobalOptions class maps directly to the Highcharts global options in the Highcharts API.
Global options are added to your web page using Highcharts.setOptions({GlobalOptions});
The ChartOptions class maps directly to the Highcharts chart options in the Highcharts API.
Chart options are added to your web page using Highcharts.chart({ChartOptions});
All Highchart global options can be set by getting a reference to GlobalOptions from this class via getGlobalOptions().
All Highchart chart options can be set by getting a reference to ChartOptions from this class via getChartOptions().
Refer to the HyJavaCharts documentation for examples on how to use this class.
Constructor and Description |
---|
Highchart() |
Modifier and Type | Method and Description |
---|---|
String |
chartOptionsToJs()
Converts chart options to JSON.
|
ChartOptions |
getChartOptions()
Get a reference to the chartOptions object for the chart.
|
GlobalOptions |
getGlobalOptions()
Get a reference to the globalOptions object for the chart.
|
Theme |
getTheme()
Get the theme object for the chart.
|
String |
globalOptionsToJs()
Converts global options to JSON.
|
static boolean |
isAllowEvaluationStats()
Are evaluation stats allowed to be collected.
|
static boolean |
isCompressOutput()
Get whether to compress all generated global and chart options.
|
static boolean |
isConvertColors()
Get whether to convert all Colors so they can be converted back to Colors in your JavaScript.
|
static boolean |
isConvertFunctions()
Get whether to convert all functions so they can be converted back to functions in your JavaScript.
|
static boolean |
isEmitColorsAsString()
Get whether to emit all Colors as a JSON string.
|
static boolean |
isEmitFunctionsAsString()
Get whether to emit all functions as a JSON string.
|
static void |
setAllowEvaluationStats(boolean allowEvaluationStats)
Set whether to allow evaluation stats to be collected.
|
static void |
setCompressOutput(boolean compressOutput)
Set whether to compress all generated global and chart options.
|
static void |
setEmitColorsAsString(boolean emitColorsAsString)
Set whether to emit all Colors as a JSON string and convert them so they can be converted back to a Color in your JavaScript.
|
static void |
setEmitColorsAsString(boolean emitColorsAsString,
boolean convertColors)
Set whether to emit all Colors as a JSON string.
|
static void |
setEmitFunctionsAsString(boolean emitFunctionsAsString)
Set whether to emit all functions as a JSON string and convert them so they can be converted back to a function in your JavaScript.
|
static void |
setEmitFunctionsAsString(boolean emitFunctionsAsString,
boolean convertFunctions)
Set whether to emit all functions as a JSON string.
|
void |
setTheme(Theme theme)
Sets the theme for the chart.
|
String |
toJs(Object object)
Converts any model class to JSON.
|
public String globalOptionsToJs()
public String chartOptionsToJs()
public String toJs(Object object)
object
- the model class.public GlobalOptions getGlobalOptions()
public ChartOptions getChartOptions()
public Theme getTheme()
public void setTheme(Theme theme)
theme
- The theme selected for the chart.public static boolean isEmitFunctionsAsString()
public static boolean isConvertFunctions()
public static void setEmitFunctionsAsString(boolean emitFunctionsAsString)
emitFunctionsAsString
- boolean whether to emit all functions as a JSON string.public static void setEmitFunctionsAsString(boolean emitFunctionsAsString, boolean convertFunctions)
emitFunctionsAsString
- boolean whether to emit all functions as a JSON string.convertFunctions
- boolean whether to convert all functions so they can be converted back to functions in your JavaScript.public static boolean isEmitColorsAsString()
public static boolean isConvertColors()
public static void setEmitColorsAsString(boolean emitColorsAsString)
emitColorsAsString
- boolean whether to emit all Colors as a JSON string.public static void setEmitColorsAsString(boolean emitColorsAsString, boolean convertColors)
emitColorsAsString
- boolean whether to emit all Colors as a JSON string.convertColors
- boolean whether to convert all Colors so they can be converted back to Colors in your JavaScript.public static boolean isCompressOutput()
public static void setCompressOutput(boolean compressOutput)
compressOutput
- true or false.public static boolean isAllowEvaluationStats()
public static void setAllowEvaluationStats(boolean allowEvaluationStats)
allowEvaluationStats
- true or false.Copyright © 2024. All rights reserved.