Class XYValueSeries
java.lang.Object
com.codename1.charts.models.XYSeries
com.codename1.charts.models.XYValueSeries
An extension of the XY series which adds a third dimension. It is used for XY
charts like bubble.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double x, double y) Adds a new value to the series.voidadd(double x, double y, double value) Adds a new value to the series.voidclear()Removes all the values from the series.doubleReturns the maximum value.doubleReturns the minimum value.doublegetValue(int index) Returns the value at the specified index.voidremove(int index) Removes an existing value from the series.Methods inherited from class XYSeries
add, addAnnotation, addAnnotation, clearAnnotations, clearSeriesValues, getAnnotationAt, getAnnotationCount, getAnnotationX, getAnnotationY, getIndexForKey, getItemCount, getMaxX, getMaxY, getMinX, getMinY, getPadding, getRange, getScaleNumber, getTitle, getX, getXYMap, getY, removeAnnotation, setTitleModifier and TypeMethodDescriptionvoidadd(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) coordinatesvoidRemoves 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.protected doublegetPadding(double x) 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.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
-
XYValueSeries
Builds a new XY value series.
Parameters
title: the series title.
-
-
Method Details
-
add
public void add(double x, double y, double value) Adds a new value to the series.
Parameters
-
x: the value for the X axis -
y: the value for the Y axis -
value: the value
-
-
add
-
remove
-
clear
-
getValue
public double getValue(int index) Returns the value at the specified index.
Parameters
index: the index
Returns
the value
-
getMinValue
public double getMinValue()Returns the minimum value.
Returns
the minimum value
-
getMaxValue
public double getMaxValue()Returns the maximum value.
Returns
the maximum value
-