public class CategorySeries extends Object
Constructor and Description |
---|
CategorySeries(String title)
Builds a new category series.
|
Modifier and Type | Method and Description |
---|---|
void |
add(double value)
Adds a new value to the series
|
void |
add(String category,
double value)
Adds a new value to the series.
|
void |
clear()
Removes all the existing values from the series.
|
String |
getCategory(int index)
Returns the category name at the specified index.
|
int |
getItemCount()
Returns the series item count.
|
String |
getTitle()
Returns the series title.
|
double |
getValue(int index)
Returns the value at the specified index.
|
void |
remove(int index)
Removes an existing value from the series.
|
void |
set(int index,
String category,
double value)
Replaces the value at the specific index in the series.
|
XYSeries |
toXYSeries()
Transforms the category series to an XY series.
|
public CategorySeries(String title)
title
- the series titlepublic String getTitle()
public void add(double value)
value
- the new valuepublic void add(String category, double value)
category
- the categoryvalue
- the new valuepublic void set(int index, String category, double value)
index
- the index in the seriescategory
- the categoryvalue
- the new valuepublic void remove(int index)
index
- the index in the series of the value to removepublic void clear()
public double getValue(int index)
index
- the indexpublic String getCategory(int index)
index
- the indexpublic int getItemCount()
public XYSeries toXYSeries()