Class MultipleCategorySeries

java.lang.Object
com.codename1.charts.models.MultipleCategorySeries

public class MultipleCategorySeries extends Object
A series for the multiple category charts like the doughnut.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Builds a new category series.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(String[] titles, double[] values)
    Adds a new value to the series
    void
    add(String category, String[] titles, double[] values)
    Adds a new value to the series.
    void
    Removes all the existing values from the series.
    int
    Returns the categories count.
    getCategory(int index)
    Returns the category name at the specified index.
    int
    getItemCount(int index)
    Returns the series item count.
    getTitles(int index)
    Returns the series titles.
    double[]
    getValues(int index)
    Returns the values at the specified index.
    void
    remove(int index)
    Removes an existing value from the series.
    Transforms the category series to an XY series.

    Methods inherited from class Object

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

    • MultipleCategorySeries

      public MultipleCategorySeries(String title)

      Builds a new category series.

      Parameters
      • title: the series title
  • Method Details

    • add

      public void add(String[] titles, double[] values)

      Adds a new value to the series

      Parameters
      • titles: the titles to be used as labels

      • values: the new value

    • add

      public void add(String category, String[] titles, double[] values)

      Adds a new value to the series.

      Parameters
      • category: the category name

      • titles: the titles to be used as labels

      • values: the new value

    • 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
    • clear

      public void clear()
      Removes all the existing values from the series.
    • getValues

      public double[] getValues(int index)

      Returns the values at the specified index.

      Parameters
      • index: the index
      Returns

      the value at the index

    • getCategory

      public String getCategory(int index)

      Returns the category name at the specified index.

      Parameters
      • index: the index
      Returns

      the category name at the index

    • getCategoriesCount

      public int getCategoriesCount()

      Returns the categories count.

      Returns

      the categories count

    • getItemCount

      public int getItemCount(int index)

      Returns the series item count.

      Parameters
      • index: the index
      Returns

      the series item count

    • getTitles

      public String[] getTitles(int index)

      Returns the series titles.

      Parameters
      • index: the index
      Returns

      the series titles

    • toXYSeries

      public XYSeries toXYSeries()

      Transforms the category series to an XY series.

      Returns

      the XY series