Package org.zkoss.chart
Class State
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.State
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class State extends Optionable
A state options.All the options in this class support
DynamicalAttribute
.- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Animation
getAnimation()
Returns whether to enable or disable the initial animation of this state.Number
getBrightness(Number brightness)
Returns the brightness numberColor
getFillColor()
Returns the fill color of the point marker.Halo
getHalo()
Returns the options for the halo appearing around the hovered point in line-type series as well as outside the hovered slice in pie charts.Color
getLineColor()
Returns the color of the point marker's outline.Number
getLineWidth()
Returns the width of the point marker's outline.Number
getLineWidthPlus()
Returns the additional line width for a hovered point.Marker
getMarker()
Returns the marker of this stateString
getName()
Returns the name of this state.Number
getOpacity()
Inactive state only.Number
getRadius()
Returns the radius of the point marker.Number
getRadiusPlus()
Returns the number of pixels to increase the radius of the hovered point.boolean
isAnimation()
Returns whether to enable or disable the initial animation of this state.boolean
isEnabled()
Returns enable or disable visible feedback for selection.boolean
isHaloEnabled()
Returns whether the halo option is disabled or not.void
setAnimation(boolean animation)
Sets whether to enable or disable the initial animation of this state.void
setAnimation(Animation animation)
Sets the initial animation of this state.void
setBrightness(Number brightness)
Sets the brightness numbervoid
setEnabled(boolean enabled)
Sets enable or disable visible feedback for selection.void
setFillColor(String color)
Sets the fill color of the point marker.void
setFillColor(Color color)
Sets the fill color of the point marker.void
setFillColor(LinearGradient color)
Sets the fill color of the point marker.void
setFillColor(RadialGradient color)
Sets the fill color of the point marker.void
setHalo(Halo halo)
Sets the options for the halo appearing around the hovered point in line-type series as well as outside the hovered slice in pie charts.void
setHaloAsBoolean(boolean halo)
Sets whether to disable the halo options or not.void
setLineColor(String color)
Sets the color of the point marker's outline.void
setLineColor(Color color)
Sets the color of the point marker's outline.void
setLineColor(LinearGradient color)
Sets the color of the point marker's outline.void
setLineColor(RadialGradient color)
Sets the color of the point marker's outline.void
setLineWidth(Number lineWidth)
Sets the width of the point marker's outline.void
setLineWidthPlus(Number lineWidthPlus)
Sets the additional line width for a hovered point.void
setMarker(Marker marker)
Sets the marker of this statevoid
setOpacity(Number opacity)
Inactive state only.void
setRadius(Number radius)
Sets the radius of the point marker.void
setRadiusPlus(Number radiusPlus)
Sets the number of pixels to increase the radius of the hovered point.-
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
-
-
-
-
Constructor Detail
-
State
public State(String name)
Constructs with a name. Like "hover" or "select"
-
-
Method Detail
-
getName
public String getName()
Returns the name of this state. Like "hover" or "select"
-
isEnabled
public boolean isEnabled()
Returns enable or disable visible feedback for selection.- Returns:
- enabled enable or disable visible feedback for selection.
-
setEnabled
public void setEnabled(boolean enabled)
Sets enable or disable visible feedback for selection. 'enabled enable or disable visible feedback for selection.
-
getFillColor
public Color getFillColor()
Returns the fill color of the point marker.Default: null.
-
setFillColor
public void setFillColor(Color color)
Sets the fill color of the point marker.
-
setFillColor
public void setFillColor(String color)
Sets the fill color of the point marker.
-
setFillColor
public void setFillColor(LinearGradient color)
Sets the fill color of the point marker.
-
setFillColor
public void setFillColor(RadialGradient color)
Sets the fill color of the point marker.
-
getHalo
public Halo getHalo()
Returns the options for the halo appearing around the hovered point in line-type series as well as outside the hovered slice in pie charts. By default the halo is filled by the current point or series color with an opacity of 0.25. The halo can be disabled by setting the halo option to false.Default: an instance of
Halo
.
-
isHaloEnabled
public boolean isHaloEnabled()
Returns whether the halo option is disabled or not.
-
setHalo
public void setHalo(Halo halo)
Sets the options for the halo appearing around the hovered point in line-type series as well as outside the hovered slice in pie charts. By default the halo is filled by the current point or series color with an opacity of 0.25. The halo can be disabled by setting the halo option to false.
-
setHaloAsBoolean
public void setHaloAsBoolean(boolean halo)
Sets whether to disable the halo options or not.
-
getLineColor
public Color getLineColor()
Returns the color of the point marker's outline. Whennull
, the series' or point's color is used.Default: "#000000"
-
setLineColor
public void setLineColor(Color color)
Sets the color of the point marker's outline. Whennull
, the series' or point's color is used.
-
setLineColor
public void setLineColor(String color)
Sets the color of the point marker's outline. Whennull
, the series' or point's color is used.
-
setLineColor
public void setLineColor(LinearGradient color)
Sets the color of the point marker's outline. Whennull
, the series' or point's color is used.
-
setLineColor
public void setLineColor(RadialGradient color)
Sets the color of the point marker's outline. Whennull
, the series' or point's color is used.
-
getLineWidth
public Number getLineWidth()
Returns the width of the point marker's outline.
-
setLineWidth
public void setLineWidth(Number lineWidth)
Sets the width of the point marker's outline.
-
getLineWidthPlus
public Number getLineWidthPlus()
Returns the additional line width for a hovered point. Defaults to 1
-
setLineWidthPlus
public void setLineWidthPlus(Number lineWidthPlus)
Sets the additional line width for a hovered point. Defaults to 1
-
getRadius
public Number getRadius()
Returns the radius of the point marker. In hover state, it defaults to the normal state's radius + 2.
-
setRadius
public void setRadius(Number radius)
Sets the radius of the point marker. In hover state, it defaults to the normal state's radius + 2.
-
getRadiusPlus
public Number getRadiusPlus()
Returns the number of pixels to increase the radius of the hovered point. Defaults to 2.
-
setRadiusPlus
public void setRadiusPlus(Number radiusPlus)
Sets the number of pixels to increase the radius of the hovered point. Defaults to 2.
-
setBrightness
public void setBrightness(Number brightness)
Sets the brightness number
-
getMarker
public Marker getMarker()
Returns the marker of this state
-
setMarker
public void setMarker(Marker marker)
Sets the marker of this state- Parameters:
marker
-
-
isAnimation
public boolean isAnimation()
Returns whether to enable or disable the initial animation of this state.Default: true.
- Since:
- 7.2.1.0
-
setAnimation
public void setAnimation(boolean animation)
Sets whether to enable or disable the initial animation of this state.- See Also:
setAnimation(Animation)
-
getAnimation
public Animation getAnimation()
Returns whether to enable or disable the initial animation of this state.Default: an instance of
Animation
.- Since:
- 7.2.1.0
-
setAnimation
public void setAnimation(Animation animation)
Sets the initial animation of this state.- Since:
- 7.2.1.0
- See Also:
setAnimation(boolean)
-
getOpacity
public Number getOpacity()
Inactive state only. Returns the opacity of series elements (dataLabels, line, area). Set to 1 to disable inactive state.Default: 0.2
- Since:
- 7.2.1.0
-
setOpacity
public void setOpacity(Number opacity)
Inactive state only. Sets the opacity of series elements (dataLabels, line, area). Set to 1 to disable inactive state.- Since:
- 7.2.1.0
-
-