Package org.aesh.charts.common
Class TimeSeries
java.lang.Object
org.aesh.charts.common.TimeSeries
A time-indexed data series where the X-axis represents timestamps.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(long epochMillis, double value) voidaddInstant(Instant time, double value) color()longendTime()static <T> TimeSeriesfrom(String name, List<T> data, ToLongFunction<T> timestampAccessor, ToDoubleFunction<T> valueAccessor) Create from typed objects using accessor functions.doublemaxValue()doubleminValue()name()static TimeSeriesCreate from arrays.static TimeSeriesCreate from Instant list.intsize()longlongtimestampAt(int index) Convert to a DataSeries where X = epoch millis as doubles.doublevalueAt(int index) values()
-
Constructor Details
-
TimeSeries
-
-
Method Details
-
of
Create from arrays. -
of
Create from Instant list. -
from
public static <T> TimeSeries from(String name, List<T> data, ToLongFunction<T> timestampAccessor, ToDoubleFunction<T> valueAccessor) Create from typed objects using accessor functions. -
add
public void add(long epochMillis, double value) -
addInstant
-
name
-
size
public int size() -
timestampAt
public long timestampAt(int index) -
valueAt
public double valueAt(int index) -
timestamps
-
values
-
startTime
public long startTime() -
endTime
public long endTime() -
minValue
public double minValue() -
maxValue
public double maxValue() -
toDataSeries
Convert to a DataSeries where X = epoch millis as doubles. -
color
-
color
-
lineStyle
-
lineStyle
-