Package org.zkoss.chart.model
Interface CategoryModel
-
- All Superinterfaces:
ChartsModel
- All Known Implementing Classes:
DefaultCategoryModel
public interface CategoryModel extends ChartsModel
A category chart data model.- Author:
- jumperchen
- See Also:
Charts
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()clear the model.Collection<Comparable<?>>getCategories()Get categories of a specified series as a collection.Comparable<?>getCategory(int index)Get a category of the specified index;Collection<List<Comparable<?>>>getKeys()Get (series, category) pairs of this chart data model.Collection<Comparable<?>>getSeries()Get all series as a collection.Comparable<?>getSeries(int index)Get a series of the specified index;NumbergetValue(Comparable<?> series, Comparable<?> category)Get value of the specified series and category.voidremoveValue(Comparable<?> series, Comparable<?> category)remove the value of the specified series and category.voidsetValue(Comparable<?> series, Comparable<?> category, Number value)add or update the value of a specified series and category.-
Methods inherited from interface org.zkoss.chart.model.ChartsModel
addChartsDataListener, removeChartsDataListener
-
-
-
-
Method Detail
-
getSeries
Comparable<?> getSeries(int index)
Get a series of the specified index;
-
getCategory
Comparable<?> getCategory(int index)
Get a category of the specified index;
-
getSeries
Collection<Comparable<?>> getSeries()
Get all series as a collection.
-
getCategories
Collection<Comparable<?>> getCategories()
Get categories of a specified series as a collection.
-
getKeys
Collection<List<Comparable<?>>> getKeys()
Get (series, category) pairs of this chart data model. The returned value is a collection of List where list.get(0) is the series, list.get(1) is the category, in the order thesetValue(java.lang.Comparable<?>, java.lang.Comparable<?>, java.lang.Number)is called.
-
getValue
Number getValue(Comparable<?> series, Comparable<?> category)
Get value of the specified series and category.- Parameters:
series- the seriescategory- the category.
-
setValue
void setValue(Comparable<?> series, Comparable<?> category, Number value)
add or update the value of a specified series and category.- Parameters:
series- the seriescategory- the category.value- the value
-
removeValue
void removeValue(Comparable<?> series, Comparable<?> category)
remove the value of the specified series and category.- Parameters:
series- the seriescategory- the category.
-
clear
void clear()
clear the model.
-
-