public class CategorySeries
- Object
- CategorySeries
Known subtypesRangeCategorySeries
A series for the category charts like the pie ones.
Constructors
public CategorySeries(String title) | Builds a new category series. |
Methods
public String getTitle() | Returns the series title. |
public synchronized void add(double value) | Adds a new value to the series |
public synchronized void add(String category, double value) | Adds a new value to the series. |
public synchronized void set(int index, String category, double value) | Replaces the value at the specific index in the series. |
public synchronized void remove(int index) | Removes an existing value from the series. |
public synchronized void clear() | Removes all the existing values from the series. |
public synchronized double getValue(int index) | Returns the value at the specified index. |
public synchronized String getCategory(int index) | Returns the category name at the specified index. |
public synchronized int getItemCount() | Returns the series item count. |
public XYSeries toXYSeries() | Transforms the category series to an XY series. |
Inherited methods
Constructor details
CategorySeries
public CategorySeries(String title)Builds a new category series.
Parameters
titleString- the series title
Method details
getTitle
public String getTitle()Returns the series title.
Returns
the series title
add
public synchronized void add(double value)Adds a new value to the series
Parameters
valuedouble- the new value
add
public synchronized void add(String category, double value)Adds a new value to the series.
Parameters
categoryString- the category
valuedouble- the new value
set
public synchronized void set(int index, String category, double value)Replaces the value at the specific index in the series.
Parameters
indexint- the index in the series
categoryString- the category
valuedouble- the new value
remove
public synchronized void remove(int index)Removes an existing value from the series.
Parameters
indexint- the index in the series of the value to remove
clear
public synchronized void clear()Removes all the existing values from the series.
getValue
public synchronized double getValue(int index)Returns the value at the specified index.
Parameters
indexint- the index
Returns
the value at the index
getCategory
public synchronized String getCategory(int index)Returns the category name at the specified index.
Parameters
indexint- the index
Returns
the category name at the index
getItemCount
public synchronized int getItemCount()Returns the series item count.
Returns
the series item count
toXYSeries
public XYSeries toXYSeries()Transforms the category series to an XY series.
Returns
the XY series