public class CategoriesPropertiesMap extends ChartPropertiesMap
Constructor and Description |
---|
CategoriesPropertiesMap() |
Modifier and Type | Method and Description |
---|---|
void |
clearAllCategoryProperties()
Remove all of category properties.
|
ChartProperties |
createCategoryProperties(java.lang.Comparable category)
Create the category properties by category name.
|
ChartProperties |
createCategoryProperties(int index)
Create the category properties in the specified position.
|
ChartProperties |
getCategoryProperties(java.lang.Comparable category)
Returns the category properties.
|
ChartProperties |
getCategoryProperties(int index)
Returns the category properties in the specified position.
|
void |
removeCategoryProperties(java.lang.Comparable category)
Remove the category properties.
|
void |
removeCategoryProperties(int index)
Remove the category properties in the specified position.
|
clearAllProperties, createProperties, getKeys, getProperties, removeProperties, size
addAllProperties, addChartDataListener, addProperty, addPropertyListener, clear, fireEvent, fireEvent, getAllProperties, getProperty, removeChartDataListener, removeProperty, removePropertyListener
public ChartProperties createCategoryProperties(java.lang.Comparable category)
PieModel piemodel = new SimplePieModel(); piemodel.setValue("C/C++", new Double(12.5)); //Category is "C/C++"Then you want to config the color of the "C/C++" category, you could invoke the
categoriesPropertiesMap.createCategoryProperties("C/C++").addProperty(CategoriesPropertiesMap.COLOR, "AFD8F8");
category
- public ChartProperties createCategoryProperties(int index)
PieModel piemodel = new SimplePieModel(); piemodel.setValue("C/C++", new Double(12.5)); //Category 0 is "C/C++" piemodel.setValue("Java", new Double(13.5)); //Category 1 is "C/C++" piemodel.setValue("VB", new Double(5.5)); //Category 2 is "VB"Then you want to set the color of the "C/C++" (index:0) category, you could invoke the
categoriesPropertiesMap.createCategoryProperties(0).addProperty(CategoriesPropertiesMap.COLOR, "AFD8F8");Note:If you invoke both the
createCategoryProperties(Comparable)
and createCategoryProperties(int)
for same category,
it will only apply the createCategoryProperties(int)
one.index
- the index of category , mapping to the index of the model.public ChartProperties getCategoryProperties(java.lang.Comparable category)
category
- public ChartProperties getCategoryProperties(int index)
index
- public void removeCategoryProperties(java.lang.Comparable category)
category
- public void removeCategoryProperties(int index)
index
- public void clearAllCategoryProperties()
Copyright © 2005-2021 Potix Corporation. All Rights Reserved.