org.zkoss.zul
Interface CategoryModel

All Superinterfaces:
ChartModel
All Known Implementing Classes:
SimpleCategoryModel

public interface CategoryModel
extends ChartModel

A catetory chart data model.

Author:
henrichen
See Also:
Chart, SimpleCategoryModel

Method Summary
 void clear()
          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;
 Number getValue(Comparable<?> series, Comparable<?> category)
          Get value of the specified series and category.
 void removeValue(Comparable<?> series, Comparable<?> category)
          remove the value of the specified series and category.
 void setValue(Comparable<?> series, Comparable<?> category, Number value)
          add or update the value of a specified series and category.
 
Methods inherited from interface org.zkoss.zul.ChartModel
addChartDataListener, removeChartDataListener
 

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 the setValue(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 series
category - 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 series
category - the category.
value - the value

removeValue

void removeValue(Comparable<?> series,
                 Comparable<?> category)
remove the value of the specified series and category.

Parameters:
series - the series
category - the category.

clear

void clear()
clear the model.



Copyright © 2014. All rights reserved.