Class DataPoint
java.lang.Object
com.djrapitops.plan.extension.graph.DataPoint
Represents series of values at point x.
x can be timestamp in milliseconds, time, or a value, depending on XAxisType chosen with GraphProvider.xAxisType().
Values can be integers, longs or doubles, even though they're stored as doubles in the database. VALUES OF SAME SERIES OF DATA NEED TO BE AT SAME INDEX ALL THE TIME.
Series are defined by index in the array. If you want more series, you need to add more data to the array.
nulls can be inserted in the middle if some series suddenly stops having data.
Requires capability DATA_EXTENSION_GRAPH_API.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DataPoint
Create a new datapoint.Supports nulls in values.
- Parameters:
x- value of x on the x-axis for this value.values- 1 to n numbers (double/long/int etc) - index determines series, series need to remain at same index every time forever.
-
DataPoint
-
-
Method Details
-
getX
public long getX()Get the x value.- Returns:
- long
-
getValues
-