public class Data extends BaseOption
An array of data points for the series. For the spline
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, 9], [1, 2], [2, 8] ]
An array of objects with named values. The objects are point configuration objects as seen 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: 0, name: "Point1", color: "#FF00FF" }]
Constructor and Description |
---|
Data() |
Modifier and Type | Method and Description |
---|---|
Number |
getX()
The x value of the point.
|
Number |
getY()
The y value of the point.
|
Data |
setX(Number x)
The x value of the point.
|
Data |
setY(Number y)
The y value of the point.
|
Number |
x()
The x value of the point.
|
Data |
x(Number x)
The x value of the point.
|
Number |
y()
The y value of the point.
|
Data |
y(Number y)
The y value of the point.
|
set_hcNulledOption
public Number x()
The x value of the point. For datetime axes, the X value is the timestamp in milliseconds since 1970.
public Data x(Number x)
The x value of the point. For datetime axes, the X value is the timestamp in milliseconds since 1970.
x
- the value for the x optionpublic Number getX()
The x value of the point. For datetime axes, the X value is the timestamp in milliseconds since 1970.
public Data setX(Number x)
The x value of the point. For datetime axes, the X value is the timestamp in milliseconds since 1970.
x
- the value for the x optionpublic Number y()
The y value of the point.
public Data y(Number y)
The y value of the point.
y
- the value for the y optionpublic Number getY()
The y value of the point.
Copyright © 2022. All rights reserved.