Class CategorySeries
java.lang.Object
com.codename1.charts.models.CategorySeries
- Direct Known Subclasses:
RangeCategorySeries
A series for the category charts like the pie ones.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double value) Adds a new value to the seriesvoidAdds a new value to the series.voidclear()Removes all the existing values from the series.getCategory(int index) Returns the category name at the specified index.intReturns the series item count.getTitle()Returns the series title.doublegetValue(int index) Returns the value at the specified index.voidremove(int index) Removes an existing value from the series.voidReplaces the value at the specific index in the series.Transforms the category series to an XY series.
-
Constructor Details
-
CategorySeries
Builds a new category series.
Parameters
title: the series title
-
-
Method Details
-
getTitle
Returns the series title.
Returns
the series title
-
add
public void add(double value) Adds a new value to the series
Parameters
value: the new value
-
add
Adds a new value to the series.
Parameters
-
category: the category -
value: the new value
-
-
set
Replaces the value at the specific index in the series.
Parameters
-
index: the index in the series -
category: the category -
value: 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. -
getValue
public double getValue(int index) Returns the value at the specified index.
Parameters
index: the index
Returns
the value at the index
-
getCategory
Returns the category name at the specified index.
Parameters
index: the index
Returns
the category name at the index
-
getItemCount
public int getItemCount()Returns the series item count.
Returns
the series item count
-
toXYSeries
Transforms the category series to an XY series.
Returns
the XY series
-