# Class XYValueSeries

java.lang.Object
com.codename1.charts.models.XYSeries
com.codename1.charts.models.XYValueSeries

public class XYValueSeries extends XYSeries
An extension of the XY series which adds a third dimension. It is used for XY charts like bubble.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `XYValueSeries(String title)`
  Builds a new XY value series.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(double x, double y)`
  Adds a new value to the series.
  `void`
  `add(double x, double y, double value)`
  Adds a new value to the series.
  `void`
  `clear()`
  Removes all the values from the series.
  `double`
  `getMaxValue()`
  Returns the maximum value.
  `double`
  `getMinValue()`
  Returns the minimum value.
  `double`
  `getValue(int index)`
  Returns the value at the specified index.
  `void`
  `remove(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, setTitle`
  Modifier and Type
  Method
  Description
  `void`
  `add(int index, double x, double y)`
  Adds a new value to the series at the specified index.
  `void`
  `addAnnotation(String annotation, double x, double y)`
  Add a String at (x,y) coordinates
  `void`
  `addAnnotation(String annotation, int index, double x, double y)`
  Add a String at (x,y) coordinates
  `void`
  `clearAnnotations()`
  Removes all the existing annotations from the series.
  `void`
  `clearSeriesValues()`
  Removes all the existing values from the series but annotations.
  `String`
  `getAnnotationAt(int index)`
  Get the String at index
  `int`
  `getAnnotationCount()`
  Get the annotations count
  `double`
  `getAnnotationX(int index)`
  Get X coordinate of the annotation at index
  `double`
  `getAnnotationY(int index)`
  Get Y coordinate of the annotation at index
  `int`
  `getIndexForKey(double key)`
  `int`
  `getItemCount()`
  Returns the series item count.
  `double`
  `getMaxX()`
  Returns the maximum value on the X axis.
  `double`
  `getMaxY()`
  Returns the maximum value on the Y axis.
  `double`
  `getMinX()`
  Returns the minimum value on the X axis.
  `double`
  `getMinY()`
  Returns the minimum value on the Y axis.
  `protected double`
  `getPadding(double x)`
  `SortedMap<Double,Double>`
  `getRange(double start, double stop, boolean beforeAfterPoints)`
  Returns submap of x and y values according to the given start and end
  `int`
  `getScaleNumber()`
  `String`
  `getTitle()`
  Returns the series title.
  `double`
  `getX(int index)`
  Returns the X axis value at the specified index.
  `com.codename1.charts.models.XYSeries.IndexXYMap<Double,Double>`
  `getXYMap()`
  Returns the current values that are used for drawing the series.
  `double`
  `getY(int index)`
  Returns the Y axis value at the specified index.
  `void`
  `removeAnnotation(int index)`
  Remove a String at index
  `void`
  `setTitle(String title)`
  Sets the series title.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
  Modifier and Type
  Method
  Description
  `protected Object`
  `clone()`
  `boolean`
  `equals(Object obj)`
  Indicates whether some other object is "equal to" this one.
  `final Class`
  `getClass()`
  Returns the runtime class of an object.
  `int`
  `hashCode()`
  Returns a hash code value for the object.
  `final void`
  `notify()`
  Wakes up a single thread that is waiting on this object's monitor.
  `final void`
  `notifyAll()`
  Wakes up all threads that are waiting on this object's monitor.
  `String`
  `toString()`
  Returns a string representation of the object.
  `final void`
  `wait()`
  Causes current thread to wait until another thread invokes the method or the method for this object.
  `final void`
  `wait(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 void`
  `wait(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

    public XYValueSeries(String title)

    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

    public void add(double x, double y)

    Adds a new value to the series.

    ###### Parameters

    - `x`: the value for the X axis

    - `y`: the value for the Y axis

    Overrides:
      `add` in class `XYSeries`

  - ### remove

    public void remove(int index)

    Removes an existing value from the series.

    ###### Parameters

    - `index`: the index in the series of the value to remove
    Overrides:
      `remove` in class `XYSeries`

  - ### clear

    public void clear()
    Removes all the values from the series.
    Overrides:
      `clear` in class `XYSeries`

  - ### 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