Class TimeSeries
java.lang.Object
com.codename1.charts.models.XYSeries
com.codename1.charts.models.TimeSeries
A series for the date / time charts.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new value to the series.protected doublegetPadding(double x) Methods inherited from class XYSeries
add, add, addAnnotation, addAnnotation, clear, clearAnnotations, clearSeriesValues, getAnnotationAt, getAnnotationCount, getAnnotationX, getAnnotationY, getIndexForKey, getItemCount, getMaxX, getMaxY, getMinX, getMinY, getRange, getScaleNumber, getTitle, getX, getXYMap, getY, remove, removeAnnotation, setTitleModifier and TypeMethodDescriptionvoidadd(double x, double y) Adds a new value to the series.voidadd(int index, double x, double y) Adds a new value to the series at the specified index.voidaddAnnotation(String annotation, double x, double y) Add a String at (x,y) coordinatesvoidaddAnnotation(String annotation, int index, double x, double y) Add a String at (x,y) coordinatesvoidclear()Removes all the existing values and annotations from the series.voidRemoves all the existing annotations from the series.voidRemoves all the existing values from the series but annotations.getAnnotationAt(int index) Get the String at indexintGet the annotations countdoublegetAnnotationX(int index) Get X coordinate of the annotation at indexdoublegetAnnotationY(int index) Get Y coordinate of the annotation at indexintgetIndexForKey(double key) intReturns the series item count.doublegetMaxX()Returns the maximum value on the X axis.doublegetMaxY()Returns the maximum value on the Y axis.doublegetMinX()Returns the minimum value on the X axis.doublegetMinY()Returns the minimum value on the Y axis.getRange(double start, double stop, boolean beforeAfterPoints) Returns submap of x and y values according to the given start and endintgetTitle()Returns the series title.doublegetX(int index) Returns the X axis value at the specified index.getXYMap()Returns the current values that are used for drawing the series.doublegetY(int index) Returns the Y axis value at the specified index.voidremove(int index) Removes an existing value from the series.voidremoveAnnotation(int index) Remove a String at indexvoidSets the series title.Methods inherited from class Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()booleanIndicates whether some other object is "equal to" this one.final ClassgetClass()Returns the runtime class of an object.inthashCode()Returns a hash code value for the object.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.toString()Returns a string representation of the object.final voidwait()Causes current thread to wait until another thread invokes the method or the method for this object.final voidwait(long timeout) Causes current thread to wait until either another thread invokes the method or the method for this object, or a specified amount of time has elapsed.final voidwait(long timeout, int nanos) Causes current thread to wait until another thread invokes the method or the method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
-
Constructor Details
-
TimeSeries
Builds a new date / time series.
Parameters
title: the series title
-
-
Method Details
-
add
Adds a new value to the series.
Parameters
-
x: the date / time value for the X axis -
y: the value for the Y axis
-
-
getPadding
protected double getPadding(double x) - Overrides:
getPaddingin classXYSeries
-