Package org.zkoss.chart.plotOptions
Class PiePlotOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.SeriesPlotOptions
-
- org.zkoss.chart.plotOptions.PiePlotOptions
-
- All Implemented Interfaces:
Serializable,OptionDataListener,org.zkoss.json.JSONAware
- Direct Known Subclasses:
FunnelPlotOptions,SunburstPlotOptions,VariablePiePlotOptions
public class PiePlotOptions extends SeriesPlotOptions
An option for pie plotAll the options in this class support
DynamicalAttribute.- Author:
- jumperchen, RaymondChao
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description PiePlotOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ColorgetBorderColor()Returns the color of the border surrounding each slice.NumbergetBorderWidth()Returns the width of the border surrounding each slice.List<String>getCenter()Returns the center of the pie chart relative to the plot area.List<Color>getColors()Returns a series specific or series type specific color set to use instead of the globalCharts.getColors().NumbergetDepth()Returns the thickness of a 3D pie chart.NumbergetEndAngle()Returns the end angle of the pie in degrees where 0 is top and 90 is right.ColorgetFillColor()If the total sum of the pie's values is 0, the series is represented as an empty circle.StringgetInnerSize()Returns the size of the inner diameter for the pie.NumbergetMinSize()Returns the minimum size for a pie in response to auto margins.ObjectgetSize()Returns the diameter of the pie relative to the plot area.NumbergetSlicedOffset()Returns if a point is sliced, moved out from the center, how many pixels should it be moved?NumbergetStartAngle()Returns the start angle of the pie slices in degrees where 0 is top and 90 right.NumbergetThickness()Returns thickness describing the ring size for a donut type chart, overridinggetInnerSize().booleanisIgnoreHiddenPoint()Returns whether ignore the hidden point.booleanisShowInLegend()Returns whether to display this particular series or series type in the legend.booleanisStickyTracking()Returns sticky tracking of mouse events.protected DataLabelsnewDataLabels()Internal method for subclasses to provide specific type of data labels.voidsetBorderColor(String color)Sets the color of the border surrounding each slice.voidsetBorderColor(Color color)Sets the color of the border surrounding each slice.voidsetBorderColor(LinearGradient color)Sets the color of the border surrounding each slice.voidsetBorderColor(RadialGradient color)Sets the color of the border surrounding each slice.voidsetBorderWidth(Number borderWidth)Sets the width of the border surrounding each slice.voidsetCenter(Object... center)Sets the center of the pie chart relative to the plot area.voidsetCenter(List<Object> center)Sets the center of the pie chart relative to the plot area.voidsetColors(String... source)Sets a series specific or series type specific color set to use instead of the globalCharts.getColors().voidsetColors(List<Color> colors)Sets a series specific or series type specific color set to use instead of the globalCharts.getColors().voidsetDepth(Number depth)Sets the Returns the thickness of a 3D pie chart.voidsetEndAngle(Number endAngle)Sets the end angle of the pie in degrees where 0 is top and 90 is right.voidsetFillColor(String fillColor)If the total sum of the pie's values is 0, the series is represented as an empty circle.voidsetFillColor(Color fillColor)If the total sum of the pie's values is 0, the series is represented as an empty circle.voidsetFillColor(LinearGradient fillColor)If the total sum of the pie's values is 0, the series is represented as an empty circle.voidsetFillColor(RadialGradient fillColor)If the total sum of the pie's values is 0, the series is represented as an empty circle.voidsetIgnoreHiddenPoint(boolean ignoreHiddenPoint)Sets whether ignore the hidden point.voidsetInnerSize(Number innerSize)Sets the size of the inner diameter for the pie.voidsetInnerSize(String innerSize)Sets the size of the inner diameter for the pie.voidsetMinSize(Number minSize)Sets the minimum size for a pie in response to auto margins.voidsetShowInLegend(boolean showInLegend)Sets whether to display this particular series or series type in the legend.voidsetSize(Number size)Sets the diameter of the pie relative to the plot area.voidsetSize(String size)Sets the diameter of the pie relative to the plot area.voidsetSlicedOffset(Number slicedOffset)Sets if a point is sliced, moved out from the center, how many pixels should it be moved?voidsetStartAngle(Number startAngle)Sets the start angle of the pie slices in degrees where 0 is top and 90 right.voidsetStickyTracking(boolean stickyTracking)Sets sticky tracking of mouse events.voidsetThickness(Number thickness)Sets thickness describing the ring size for a donut type chart, overridinggetInnerSize().-
Methods inherited from class org.zkoss.chart.plotOptions.SeriesPlotOptions
addDataLabels, getAccessibility, getAnimation, getAnimationLimit, getBoostBlending, getBoostThreshold, getBorderRadius, getClassName, getColor, getColorAxis, getColorIndex, getColorKey, getConnectorWidth, getCropThreshold, getCursor, getCustom, getDashStyle, getDataLabels, getDataLabelsList, getDataSorting, getDescription, getDragDrop, getFindNearestPointBy, getGroupPadding, getId, getIndex, getKeys, getLabel, getLegendSymbol, getLinecap, getLineWidth, getLinkedTo, getMarker, getName, getNeckHeight, getNeckWidth, getNegativeColor, getOnPoint, getOpacity, getPointDescriptionFormatter, getPointInterval, getPointIntervalUnit, getPointPlacement, getPointStart, getStacking, getStates, getStep, getThreshold, getTooltip, getTurboThreshold, getZoneAxis, getZones, isAllowPointSelect, isAnimation, isCenterInCategory, isClip, isColorByPoint, isConnectEnds, isConnectNulls, isCrisp, isDataAsColumns, isEnableMouseTracking, isGetExtremesFromAll, isIncludeInDataExport, isRelativeXValue, isSelected, isShadow, isShowCheckbox, isSkipKeyboardNavigation, isSoftThreshold, isStacking, isVisible, isZoomEnabled, setAccessibility, setAllowPointSelect, setAnimation, setAnimation, setAnimationLimit, setBoostBlending, setBoostThreshold, setBorderRadius, setBorderRadius, setCenterInCategory, setClassName, setClip, setColor, setColor, setColor, setColor, setColorAxis, setColorAxis, setColorAxis, setColorByPoint, setColorIndex, setColorKey, setConnectEnds, setConnectNulls, setConnectorWidth, setCrisp, setCropThreshold, setCursor, setCustom, setDashStyle, setDataAsColumns, setDataLabels, setDataLabels, setDataSorting, setDescription, setDragDrop, setEnableMouseTracking, setFindNearestPointBy, setGetExtremesFromAll, setGroupPadding, setId, setIncludeInDataExport, setIndex, setKeys, setLabel, setLegendSymbol, setLinecap, setLineWidth, setLinkedTo, setMarker, setName, setNeckHeight, setNeckWidth, setNegativeColor, setNegativeColor, setNegativeColor, setNegativeColor, setOnPoint, setOpacity, setPointDescriptionFormatter, setPointInterval, setPointIntervalUnit, setPointPlacement, setPointPlacement, setPointStart, setPointStart, setRelativeXValue, setSelected, setShadow, setShowCheckbox, setSkipKeyboardNavigation, setSoftThreshold, setStacking, setStacking, setStates, setStep, setThreshold, setTooltip, setTurboThreshold, setVisible, setWidth, setZoneAxis, setZones, setZones, setZoomEnabled
-
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
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.zkoss.chart.OptionDataListener
onChange
-
-
-
-
Method Detail
-
newDataLabels
protected DataLabels newDataLabels()
Description copied from class:SeriesPlotOptionsInternal method for subclasses to provide specific type of data labels.- Overrides:
newDataLabelsin classSeriesPlotOptions
-
getBorderColor
public Color getBorderColor()
Returns the color of the border surrounding each slice.Default: #FFFFFF
-
setBorderColor
public void setBorderColor(Color color)
Sets the color of the border surrounding each slice.
-
setBorderColor
public void setBorderColor(String color)
Sets the color of the border surrounding each slice.
-
setBorderColor
public void setBorderColor(LinearGradient color)
Sets the color of the border surrounding each slice.
-
setBorderColor
public void setBorderColor(RadialGradient color)
Sets the color of the border surrounding each slice.
-
getBorderWidth
public Number getBorderWidth()
Returns the width of the border surrounding each slice.Default: 1
- Overrides:
getBorderWidthin classSeriesPlotOptions
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Sets the width of the border surrounding each slice.- Overrides:
setBorderWidthin classSeriesPlotOptions
-
getCenter
public List<String> getCenter()
Returns the center of the pie chart relative to the plot area. Can be percentages or pixel values. The default behavior is to center the pie so that all slices and data labels are within the plot area. As a consequence, the pie may actually jump around in a chart with dynamic values, as the data labels move. In that case, the center should be explicitly set, for example to["50%", "50%"].
-
setCenter
public void setCenter(List<Object> center)
Sets the center of the pie chart relative to the plot area. Can be percentages or pixel values. The default behavior is to center the pie so that all slices and data labels are within the plot area. As a consequence, the pie may actually jump around in a chart with dynamic values, as the data labels move. In that case, the center should be explicitly set, for example to["50%", "50%"].- Overrides:
setCenterin classSeriesPlotOptions
-
setCenter
public void setCenter(Object... center)
Description copied from class:SeriesPlotOptionsSets the center of the pie chart relative to the plot area. Can be percentages or pixel values. The default behaviour is to center the pie so that all slices and data labels are within the plot area. As a consequence, the pie may actually jump around in a chart with dynamic values, as the data labels move. In that case, the center should be explicitly set, for example to ["50%", "50%"].- Overrides:
setCenterin classSeriesPlotOptions
-
getColors
public List<Color> getColors()
Returns a series specific or series type specific color set to use instead of the globalCharts.getColors().
-
setColors
public void setColors(List<Color> colors)
Sets a series specific or series type specific color set to use instead of the globalCharts.getColors().
-
setColors
public void setColors(String... source)
Sets a series specific or series type specific color set to use instead of the globalCharts.getColors().
-
getDepth
public Number getDepth()
Returns the thickness of a 3D pie chart.Default: 0
- Overrides:
getDepthin classSeriesPlotOptions
-
setDepth
public void setDepth(Number depth)
Sets the Returns the thickness of a 3D pie chart.- Overrides:
setDepthin classSeriesPlotOptions
-
getEndAngle
public Number getEndAngle()
Returns the end angle of the pie in degrees where 0 is top and 90 is right.Defaults to
startAngleplus 360.
-
setEndAngle
public void setEndAngle(Number endAngle)
Sets the end angle of the pie in degrees where 0 is top and 90 is right.Defaults to
startAngleplus 360.
-
getFillColor
public Color getFillColor()
If the total sum of the pie's values is 0, the series is represented as an empty circle. The fillColor option defines the color of that circle. Use pie.borderWidth to set the border thickness.- Since:
- 7.2.1.0
-
setFillColor
public void setFillColor(Color fillColor)
If the total sum of the pie's values is 0, the series is represented as an empty circle. The fillColor option defines the color of that circle. Use pie.borderWidth to set the border thickness.- Since:
- 7.2.1.0
-
setFillColor
public void setFillColor(String fillColor)
If the total sum of the pie's values is 0, the series is represented as an empty circle. The fillColor option defines the color of that circle. Use pie.borderWidth to set the border thickness.- Since:
- 7.2.1.0
-
setFillColor
public void setFillColor(LinearGradient fillColor)
If the total sum of the pie's values is 0, the series is represented as an empty circle. The fillColor option defines the color of that circle. Use pie.borderWidth to set the border thickness.- Since:
- 7.2.1.0
-
setFillColor
public void setFillColor(RadialGradient fillColor)
If the total sum of the pie's values is 0, the series is represented as an empty circle. The fillColor option defines the color of that circle. Use pie.borderWidth to set the border thickness.- Since:
- 7.2.1.0
-
isIgnoreHiddenPoint
public boolean isIgnoreHiddenPoint()
Returns whether ignore the hidden point.Equivalent to
Chart.isIgnoreHiddenSeries(), this option tells whether the series shall be redrawn as if the hidden point werenull.The default value true.
-
setIgnoreHiddenPoint
public void setIgnoreHiddenPoint(boolean ignoreHiddenPoint)
Sets whether ignore the hidden point.Equivalent to
Chart.isIgnoreHiddenSeries(), this option tells whether the series shall be redrawn as if the hidden point werenull.The default value true.
-
getInnerSize
public String getInnerSize()
Returns the size of the inner diameter for the pie. A size greater than 0 renders a donut chart. Can be a percentage or pixel value. Percentages are relative to the size of the plot area. Pixel values are given as integers.
-
setInnerSize
public void setInnerSize(String innerSize)
Sets the size of the inner diameter for the pie. A size greater than 0 renders a donut chart. Can be a percentage or pixel value. Percentages are relative to the size of the plot area. Pixel values are given as integers.
-
setInnerSize
public void setInnerSize(Number innerSize)
Sets the size of the inner diameter for the pie. A size greater than 0 renders a donut chart. Can be a percentage or pixel value. Percentages are relative to the size of the plot area. Pixel values are given as integers.
-
getMinSize
public Number getMinSize()
Returns the minimum size for a pie in response to auto margins. The pie will try to shrink to make room for data labels in side the plot area, but only to this size.Default:
80
-
setMinSize
public void setMinSize(Number minSize)
Sets the minimum size for a pie in response to auto margins. The pie will try to shrink to make room for data labels in side the plot area, but only to this size.Default:
80
-
isShowInLegend
public boolean isShowInLegend()
Returns whether to display this particular series or series type in the legend. Pies are not shown in the legend by default.- Overrides:
isShowInLegendin classSeriesPlotOptions
-
setShowInLegend
public void setShowInLegend(boolean showInLegend)
Sets whether to display this particular series or series type in the legend. Pies are not shown in the legend by default.- Overrides:
setShowInLegendin classSeriesPlotOptions
-
getSize
public Object getSize()
Returns the diameter of the pie relative to the plot area. Can be a percentage or pixel value. Pixel values are given as integers. The default behavior is to scale to the plot area and give room for data labels within the plot area. As a consequence, the size of the pie may vary when points are updated and data labels more around. In that case it is best to set a fixed value, for example"75%".Default: null
-
setSize
public void setSize(String size)
Sets the diameter of the pie relative to the plot area. Can be a percentage or pixel value. Pixel values are given as integers. The default behavior is to scale to the plot area and give room for data labels within the plot area. As a consequence, the size of the pie may vary when points are updated and data labels more around. In that case it is best to set a fixed value, for example"75%".
-
setSize
public void setSize(Number size)
Sets the diameter of the pie relative to the plot area. Can be a percentage or pixel value. Pixel values are given as integers. The default behavior is to scale to the plot area and give room for data labels within the plot area. As a consequence, the size of the pie may vary when points are updated and data labels more around. In that case it is best to set a fixed value, for example"75%".
-
getSlicedOffset
public Number getSlicedOffset()
Returns if a point is sliced, moved out from the center, how many pixels should it be moved?Default: 10
-
setSlicedOffset
public void setSlicedOffset(Number slicedOffset)
Sets if a point is sliced, moved out from the center, how many pixels should it be moved?
-
getStartAngle
public Number getStartAngle()
Returns the start angle of the pie slices in degrees where 0 is top and 90 right.Default: 0
-
setStartAngle
public void setStartAngle(Number startAngle)
Sets the start angle of the pie slices in degrees where 0 is top and 90 right.
-
isStickyTracking
public boolean isStickyTracking()
Returns sticky tracking of mouse events. When true, themouseOutevent on a series isn't triggered until the mouse moves over another series, or out of the plot area. When false, themouseOutevent on a series is triggered when the mouse leaves the area around the series' graph or markers. This also implies the tooltip. WhenstickyTrackingis false andtooltip.sharedis false, the tooltip will be hidden when moving the mouse between series.Default: false
- Overrides:
isStickyTrackingin classSeriesPlotOptions
-
setStickyTracking
public void setStickyTracking(boolean stickyTracking)
Sets sticky tracking of mouse events. When true, themouseOutevent on a series isn't triggered until the mouse moves over another series, or out of the plot area. When false, themouseOutevent on a series is triggered when the mouse leaves the area around the series' graph or markers. This also implies the tooltip. WhenstickyTrackingis false andtooltip.sharedis false, the tooltip will be hidden when moving the mouse between series.- Overrides:
setStickyTrackingin classSeriesPlotOptions
-
getThickness
public Number getThickness()
Returns thickness describing the ring size for a donut type chart, overridinggetInnerSize().Default:
null- Since:
- 10.2.1.0
-
setThickness
public void setThickness(Number thickness)
Sets thickness describing the ring size for a donut type chart, overridinggetInnerSize().Default:
null- Since:
- 10.2.1.0
-
-