public class SeriesLine extends Series
A line
series. If the type option is not specified, it is inherited from chart.type.
In TypeScript the type option must always be set.
Configuration options for the series are given in three levels:
line
series are defined in plotOptions.line.Highcharts.chart('container', { plotOptions: { series: { // general options for all series }, line: { // shared options for all line series } }, series: [{ // specific options for this series instance type: 'line' }] });
Copyright (c) 2022 Powerbuilt Systems. All rights reserved.Modifier and Type | Field and Description |
---|---|
static SeriesLine |
NULL |
Constructor and Description |
---|
SeriesLine() |
Modifier and Type | Method and Description |
---|---|
List<Number> |
getDataAsArrayNumber()
An array of data points for the series.
|
List<Data> |
getDataAsArrayObject()
An array of data points for the series.
|
Data |
getDataAsArrayObjectSingle()
An array of data points for the series.
|
String |
getName()
The name of the series as shown in the legend, tooltip etc.
|
SeriesLine |
setDataAsArrayNumber(List<Number> dataAsArrayNumber)
An array of data points for the series.
|
SeriesLine |
setDataAsArrayObject(List<Data> dataAsArrayObject)
An array of data points for the series.
|
SeriesLine |
setName(String name)
The name of the series as shown in the legend, tooltip etc.
|
set_hcNulledOption
public static final SeriesLine NULL
public Data getDataAsArrayObjectSingle()
An array of data points for the series. For the line
series type, points can be given in the following ways:
An array of numerical values. In this case, the numerical values will be interpreted as y
options. The x
values will be automatically calculated, either starting at 0 and incremented by 1, or from pointStart
and pointInterval
given in the series options. If the axis has categories, these will be used. Example:
data: [0, 5, 3, 5]
An array of arrays with 2 values. In this case, the values correspond to x,y
. If the first value is a string, it is applied as the name of the point, and the x
value is inferred.
data: [ [0, 1], [1, 2], [2, 8] ]
An array of objects with named values. The following snippet shows only a few settings, see the complete options set below. If the total number of data points exceeds the series' turboThreshold, this option is not available.
data: [{ x: 1, y: 9, name: "Point2", color: "#00FF00" }, { x: 1, y: 6, name: "Point1", color: "#FF00FF" }]
Note: In TypeScript you have to extend PointOptionsObject
with an additional declaration to allow custom data types:
declare module `highcharts` { interface PointOptionsObject { custom: Record<string, (boolean|number|string)>; } }
public List<Data> getDataAsArrayObject()
An array of data points for the series. For the line
series type, points can be given in the following ways:
An array of numerical values. In this case, the numerical values will be interpreted as y
options. The x
values will be automatically calculated, either starting at 0 and incremented by 1, or from pointStart
and pointInterval
given in the series options. If the axis has categories, these will be used. Example:
data: [0, 5, 3, 5]
An array of arrays with 2 values. In this case, the values correspond to x,y
. If the first value is a string, it is applied as the name of the point, and the x
value is inferred.
data: [ [0, 1], [1, 2], [2, 8] ]
An array of objects with named values. The following snippet shows only a few settings, see the complete options set below. If the total number of data points exceeds the series' turboThreshold, this option is not available.
data: [{ x: 1, y: 9, name: "Point2", color: "#00FF00" }, { x: 1, y: 6, name: "Point1", color: "#FF00FF" }]
Note: In TypeScript you have to extend PointOptionsObject
with an additional declaration to allow custom data types:
declare module `highcharts` { interface PointOptionsObject { custom: Record<string, (boolean|number|string)>; } }
public SeriesLine setDataAsArrayObject(List<Data> dataAsArrayObject)
An array of data points for the series. For the line
series type, points can be given in the following ways:
An array of numerical values. In this case, the numerical values will be interpreted as y
options. The x
values will be automatically calculated, either starting at 0 and incremented by 1, or from pointStart
and pointInterval
given in the series options. If the axis has categories, these will be used. Example:
data: [0, 5, 3, 5]
An array of arrays with 2 values. In this case, the values correspond to x,y
. If the first value is a string, it is applied as the name of the point, and the x
value is inferred.
data: [ [0, 1], [1, 2], [2, 8] ]
An array of objects with named values. The following snippet shows only a few settings, see the complete options set below. If the total number of data points exceeds the series' turboThreshold, this option is not available.
data: [{ x: 1, y: 9, name: "Point2", color: "#00FF00" }, { x: 1, y: 6, name: "Point1", color: "#FF00FF" }]
Note: In TypeScript you have to extend PointOptionsObject
with an additional declaration to allow custom data types:
declare module `highcharts` { interface PointOptionsObject { custom: Record<string, (boolean|number|string)>; } }
dataAsArrayObject
- the value for the dataAsArrayObject optionpublic List<Number> getDataAsArrayNumber()
An array of data points for the series. For the line
series type, points can be given in the following ways:
An array of numerical values. In this case, the numerical values will be interpreted as y
options. The x
values will be automatically calculated, either starting at 0 and incremented by 1, or from pointStart
and pointInterval
given in the series options. If the axis has categories, these will be used. Example:
data: [0, 5, 3, 5]
An array of arrays with 2 values. In this case, the values correspond to x,y
. If the first value is a string, it is applied as the name of the point, and the x
value is inferred.
data: [ [0, 1], [1, 2], [2, 8] ]
An array of objects with named values. The following snippet shows only a few settings, see the complete options set below. If the total number of data points exceeds the series' turboThreshold, this option is not available.
data: [{ x: 1, y: 9, name: "Point2", color: "#00FF00" }, { x: 1, y: 6, name: "Point1", color: "#FF00FF" }]
Note: In TypeScript you have to extend PointOptionsObject
with an additional declaration to allow custom data types:
declare module `highcharts` { interface PointOptionsObject { custom: Record<string, (boolean|number|string)>; } }
public SeriesLine setDataAsArrayNumber(List<Number> dataAsArrayNumber)
An array of data points for the series. For the line
series type, points can be given in the following ways:
An array of numerical values. In this case, the numerical values will be interpreted as y
options. The x
values will be automatically calculated, either starting at 0 and incremented by 1, or from pointStart
and pointInterval
given in the series options. If the axis has categories, these will be used. Example:
data: [0, 5, 3, 5]
An array of arrays with 2 values. In this case, the values correspond to x,y
. If the first value is a string, it is applied as the name of the point, and the x
value is inferred.
data: [ [0, 1], [1, 2], [2, 8] ]
An array of objects with named values. The following snippet shows only a few settings, see the complete options set below. If the total number of data points exceeds the series' turboThreshold, this option is not available.
data: [{ x: 1, y: 9, name: "Point2", color: "#00FF00" }, { x: 1, y: 6, name: "Point1", color: "#FF00FF" }]
Note: In TypeScript you have to extend PointOptionsObject
with an additional declaration to allow custom data types:
declare module `highcharts` { interface PointOptionsObject { custom: Record<string, (boolean|number|string)>; } }
dataAsArrayNumber
- the value for the dataAsArrayNumber optionpublic String getName()
The name of the series as shown in the legend, tooltip etc.
public SeriesLine setName(String name)
The name of the series as shown in the legend, tooltip etc.
name
- the value for the name optionCopyright © 2022. All rights reserved.