Package org.zkoss.chart
Class DataClass
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.DataClass
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
public class DataClass extends Optionable
A data class or range for the choropleth map.- Since:
- 7.2.1.0
- Author:
- rudyhuang
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description DataClass()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetColor()Returns the color of each data class.NumbergetFrom()Returns the start of the value range that the data class represents, relating to the point value.StringgetName()Returns the name of the data class as it appears in the legend.NumbergetTo()Returns the end of the value range that the data class represents, relating to the point value.voidsetColor(String color)Sets the color of each data class.voidsetColor(Color color)Sets the color of each data class.voidsetColor(LinearGradient color)Sets the color of each data class.voidsetColor(RadialGradient color)Sets the color of each data class.voidsetFrom(Number from)Sets the start of the value range that the data class represents, relating to the point value.voidsetName(String name)Sets the name of the data class as it appears in the legend.voidsetTo(Number to)Sets the end of the value range that the data class represents, relating to the point value.-
Methods inherited from class org.zkoss.chart.Optionable
addExtraAttr, addOptionDataListener, clearOptonDataListener, clone, containsKey, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getAttr, getAttr, getClientState, getExtraAttr, merge, onChange, removeExtraAttr, removeKey, removeOptionDataListener, setAttr, setAttr, setAttr, setAttr, toJSONString, toString
-
-
-
-
Method Detail
-
getColor
public Color getColor()
Returns the color of each data class. If not set, the color is pulled from the global or chart-specific colors array.Default: null.
-
setColor
public void setColor(Color color)
Sets the color of each data class.
-
setColor
public void setColor(String color)
Sets the color of each data class.
-
setColor
public void setColor(LinearGradient color)
Sets the color of each data class.
-
setColor
public void setColor(RadialGradient color)
Sets the color of each data class.
-
getFrom
public Number getFrom()
Returns the start of the value range that the data class represents, relating to the point value. The range of each dataClass is closed in both ends, but can be overridden by the next dataClass.Default: null
-
setFrom
public void setFrom(Number from)
Sets the start of the value range that the data class represents, relating to the point value. The range of each dataClass is closed in both ends, but can be overridden by the next dataClass.
-
getName
public String getName()
Returns the name of the data class as it appears in the legend. If no name is given, it is automatically created based on the from and to values. For full programmatic control, legend.labelFormatter can be used. In the formatter, this.from and this.to can be accessed.Default: null
-
setName
public void setName(String name)
Sets the name of the data class as it appears in the legend. If no name is given, it is automatically created based on the from and to values. For full programmatic control, legend.labelFormatter can be used. In the formatter, this.from and this.to can be accessed.
-
getTo
public Number getTo()
Returns the end of the value range that the data class represents, relating to the point value. The range of each dataClass is closed in both ends, but can be overridden by the next dataClass.Default: null
-
setTo
public void setTo(Number to)
Sets the end of the value range that the data class represents, relating to the point value. The range of each dataClass is closed in both ends, but can be overridden by the next dataClass.
-
-