public class ChartOptions extends BaseOption
The ChartOptions class maps directly to the Highcharts chart options in the Highcharts API.
All Highchart chart options will be set from this class.
Modifier and Type | Field and Description |
---|---|
static ChartOptions |
NULL |
Constructor and Description |
---|
ChartOptions() |
Modifier and Type | Method and Description |
---|---|
Chart |
getChart()
General options for the chart.
|
List<Color> |
getColors() |
Color |
getColorsSingle() |
Legend |
getLegend()
The legend is a box containing a symbol and name for each series item or point item in the chart.
|
PlotOptions |
getPlotOptions()
The plotOptions is a wrapper object for config objects for each series type.
|
Responsive |
getResponsive()
Allows setting a set of rules to apply for different screen or chart sizes.
|
List<Series> |
getSeries()
Series options for specific data and the data itself.
|
Series |
getSeriesSingle()
Series options for specific data and the data itself.
|
Subtitle |
getSubtitle()
The chart's subtitle.
|
Title |
getTitle()
The chart's main title.
|
Tooltip |
getTooltip()
Options for the tooltip that appears when the user hovers over a series or point.
|
List<YAxis> |
getYAxis()
The Y axis or value axis.
|
YAxis |
getYAxisSingle()
The Y axis or value axis.
|
ChartOptions |
setChart(Chart chart)
General options for the chart.
|
ChartOptions |
setColors(List<Color> colors) |
ChartOptions |
setLegend(Legend legend)
The legend is a box containing a symbol and name for each series item or point item in the chart.
|
ChartOptions |
setPlotOptions(PlotOptions plotOptions)
The plotOptions is a wrapper object for config objects for each series type.
|
ChartOptions |
setResponsive(Responsive responsive)
Allows setting a set of rules to apply for different screen or chart sizes.
|
ChartOptions |
setSeries(List<Series> series)
Series options for specific data and the data itself.
|
ChartOptions |
setSubtitle(Subtitle subtitle)
The chart's subtitle.
|
ChartOptions |
setTitle(Title title)
The chart's main title.
|
ChartOptions |
setTooltip(Tooltip tooltip)
Options for the tooltip that appears when the user hovers over a series or point.
|
ChartOptions |
setYAxis(List<YAxis> yAxis)
The Y axis or value axis.
|
set_hcNulledOption
public static final ChartOptions NULL
public Chart getChart()
General options for the chart.
public ChartOptions setChart(Chart chart)
General options for the chart.
chart
- the value for the chart optionpublic Color getColorsSingle()
public ChartOptions setColors(List<Color> colors)
colors
- the value for the colors optionpublic Legend getLegend()
The legend is a box containing a symbol and name for each series item or point item in the chart. Each series (or points in case of pie charts) is represented by a symbol and its name in the legend.
It is possible to override the symbol creator function and create custom legend symbols.
public ChartOptions setLegend(Legend legend)
The legend is a box containing a symbol and name for each series item or point item in the chart. Each series (or points in case of pie charts) is represented by a symbol and its name in the legend.
It is possible to override the symbol creator function and create custom legend symbols.
legend
- the value for the legend optionpublic PlotOptions getPlotOptions()
The plotOptions is a wrapper object for config objects for each series type. The config objects for each series can also be overridden for each series item as given in the series array.
Configuration options for the series are given in three levels. Options for all series in a chart are given in the plotOptions.series object. Then options for all series of a specific type are given in the plotOptions of that type, for example plotOptions.line
. Next, options for one single series are given in the series array.
public ChartOptions setPlotOptions(PlotOptions plotOptions)
The plotOptions is a wrapper object for config objects for each series type. The config objects for each series can also be overridden for each series item as given in the series array.
Configuration options for the series are given in three levels. Options for all series in a chart are given in the plotOptions.series object. Then options for all series of a specific type are given in the plotOptions of that type, for example plotOptions.line
. Next, options for one single series are given in the series array.
plotOptions
- the value for the plotOptions optionpublic Responsive getResponsive()
Allows setting a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.
public ChartOptions setResponsive(Responsive responsive)
Allows setting a set of rules to apply for different screen or chart sizes. Each rule specifies additional chart options.
responsive
- the value for the responsive optionpublic Series getSeriesSingle()
Series options for specific data and the data itself. In TypeScript you have to cast the series options to specific series types, to get all possible options for a series.
public List<Series> getSeries()
Series options for specific data and the data itself. In TypeScript you have to cast the series options to specific series types, to get all possible options for a series.
public ChartOptions setSeries(List<Series> series)
Series options for specific data and the data itself. In TypeScript you have to cast the series options to specific series types, to get all possible options for a series.
series
- the value for the series optionpublic Subtitle getSubtitle()
The chart's subtitle. This can be used both to display a subtitle below the main title, and to display random text anywhere in the chart. The subtitle can be updated after chart initialization through the Chart.setTitle
method.
public ChartOptions setSubtitle(Subtitle subtitle)
The chart's subtitle. This can be used both to display a subtitle below the main title, and to display random text anywhere in the chart. The subtitle can be updated after chart initialization through the Chart.setTitle
method.
subtitle
- the value for the subtitle optionpublic Title getTitle()
The chart's main title.
public ChartOptions setTitle(Title title)
The chart's main title.
title
- the value for the title optionpublic Tooltip getTooltip()
Options for the tooltip that appears when the user hovers over a series or point.
public ChartOptions setTooltip(Tooltip tooltip)
Options for the tooltip that appears when the user hovers over a series or point.
tooltip
- the value for the tooltip optionpublic YAxis getYAxisSingle()
The Y axis or value axis. Normally this is the vertical axis, though if the chart is inverted this is the horizontal axis. In case of multiple axes, the yAxis node is an array of configuration objects.
See the Axis object for programmatic access to the axis.
public List<YAxis> getYAxis()
The Y axis or value axis. Normally this is the vertical axis, though if the chart is inverted this is the horizontal axis. In case of multiple axes, the yAxis node is an array of configuration objects.
See the Axis object for programmatic access to the axis.
public ChartOptions setYAxis(List<YAxis> yAxis)
The Y axis or value axis. Normally this is the vertical axis, though if the chart is inverted this is the horizontal axis. In case of multiple axes, the yAxis node is an array of configuration objects.
See the Axis object for programmatic access to the axis.
yAxis
- the value for the yAxis optionCopyright © 2022. All rights reserved.