public class Highstock extends Object
The Highstock 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 Javascript for GlobalOptions and ChartOptions.
The GlobalOptions class maps directly to the Highcharts Stock global options in the Highcharts Stock API.
Global options are added to your web page using Highcharts.setOptions({GlobalOptions});
The ChartOptions class maps directly to the Highcharts Stock chart options in the Highcharts Stock API.
Chart options are added to your web page using Highcharts.stockChart({ChartOptions});
All Highchart Stock global options can be set by getting a reference to GlobalOptions from this class via getGlobalOptions().
All Highchart Stock chart options can be set by getting a reference to ChartOptions from this class via getChartOptions().
Refer to the HyJavaStock documentation for examples on how to use this class.
Constructor and Description |
---|
Highstock() |
Modifier and Type | Method and Description |
---|---|
String |
chartOptionsToJs()
Converts chart options to Javascript.
|
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 Javascript.
|
static boolean |
isConvertFunctions()
Get whether to convert all functions so they can be converted back to functions in your JavaScript.
|
static boolean |
isEmitFunctionsAsString()
Get whether to emit all functions 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.
|
public String globalOptionsToJs()
public String chartOptionsToJs()
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.Copyright © 2022. All rights reserved.