Package org.zkoss.chart.plotOptions
Class ItemPlotOptions
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.SeriesPlotOptions
-
- org.zkoss.chart.plotOptions.ItemPlotOptions
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
public class ItemPlotOptions extends SeriesPlotOptions
An option for item plot- 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 ItemPlotOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getCenter()
Returns the center of the pie chart relative to the plot area.List<Color>
getColors()
Returns the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.Number
getEndAngle()
In circular view, returns the end angle of the item layout, in degrees where 0 is up.Color
getFillColor()
Returns fill color or gradient for the area.Object
getInnerSize()
In circular view, returns the size of the inner diameter of the circle.Number
getItemPadding()
Returns the padding between the items, given in relative size where the size of the item is 1.String
getLayout()
Returns the layout of the items in rectangular view.Number
getMinSize()
Returns the minimum size for a pie in response to auto margins.Number
getRows()
Returns the number of rows to display in the rectangular or circular view.Object
getSize()
Returns the diameter of the pie relative to the plot area.Number
getStartAngle()
In circular view, returns the start angle of the item layout, in degrees where 0 is up.Number
getThickness()
Returns thickness describing the ring size for a donut type chart, overridinggetInnerSize()
.boolean
isIgnoreHiddenPoint()
Returns whether ignore the hidden point.void
setCenter(Object... center)
Sets the center of the pie chart relative to the plot area.void
setCenter(List<Object> center)
Sets the center of the pie chart relative to the plot area.void
setColors(String... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.void
setColors(List<Color> colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.void
setColors(Color... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.void
setEndAngle(Number endAngle)
In circular view, sets the end angle of the item layout, in degrees where 0 is up.void
setFillColor(String color)
Sets fill color or gradient for the area.void
setFillColor(Color color)
Sets fill color or gradient for the area.void
setFillColor(LinearGradient color)
Sets fill color or gradient for the area.void
setFillColor(RadialGradient color)
Sets fill color or gradient for the area.void
setIgnoreHiddenPoint(boolean ignoreHiddenPoint)
Sets whether ignore the hidden point.void
setInnerSize(int innerSize)
In circular view, sets the size of the inner diameter of the circle.void
setInnerSize(String innerSize)
In circular view, sets the size of the inner diameter of the circle.void
setItemPadding(Number itemPadding)
Sets the padding between the items, given in relative size where the size of the item is 1.void
setLayout(String layout)
Sets the layout of the items in rectangular view.void
setMinSize(Number minSize)
Sets the minimum size for a pie in response to auto margins.void
setRows(Number rows)
Sets the number of rows to display in the rectangular or circular view.void
setSize(Number size)
Sets the diameter of the pie relative to the plot area.void
setSize(String size)
Sets the diameter of the pie relative to the plot area.void
setStartAngle(Number startAngle)
In circular view, sets the start angle of the item layout, in degrees where 0 is up.void
setThickness(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, getBorderWidth, getClassName, getColor, getColorAxis, getColorIndex, getColorKey, getConnectorWidth, getCropThreshold, getCursor, getCustom, getDashStyle, getDataLabels, getDataLabelsList, getDataSorting, getDepth, 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, isShowInLegend, isSkipKeyboardNavigation, isSoftThreshold, isStacking, isStickyTracking, isVisible, newDataLabels, setAccessibility, setAllowPointSelect, setAnimation, setAnimation, setAnimationLimit, setBoostBlending, setBoostThreshold, setBorderRadius, setBorderRadius, setBorderWidth, 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, setDepth, 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, setRelativeXValue, setSelected, setShadow, setShowCheckbox, setShowInLegend, setSkipKeyboardNavigation, setSoftThreshold, setStacking, setStacking, setStates, setStep, setStickyTracking, setThreshold, setTooltip, setTurboThreshold, setVisible, setWidth, setZoneAxis, setZones, setZones
-
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
-
setColors
public void setColors(List<Color> colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.- Since:
- 10.2.1.0
-
setColors
public void setColors(String... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.- Since:
- 10.2.1.0
-
setColors
public void setColors(Color... colors)
Sets the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.- Since:
- 10.2.1.0
-
getColors
public List<Color> getColors()
Returns the series specific or series type specific color set to apply instead of the global colors whenSeriesPlotOptions.isColorByPoint()
is true.- Since:
- 10.2.1.0
-
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 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%"].Default: [null, null]
-
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 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:
setCenter
in classSeriesPlotOptions
-
setCenter
public void setCenter(Object... center)
Sets 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:
setCenter
in classSeriesPlotOptions
-
getEndAngle
public Number getEndAngle()
In circular view, returns the end angle of the item layout, in degrees where 0 is up. Default: null
-
setEndAngle
public void setEndAngle(Number endAngle)
In circular view, sets the end angle of the item layout, in degrees where 0 is up.
-
getFillColor
public Color getFillColor()
Returns fill color or gradient for the area. Whennull
, the series'color
is used with the series'fillOpacity
.Default: null.
- Since:
- 10.2.1.0
-
setFillColor
public void setFillColor(Color color)
Sets fill color or gradient for the area. Whennull
, the series'color
is used with the series'fillOpacity
.- Since:
- 10.2.1.0
-
setFillColor
public void setFillColor(String color)
Sets fill color or gradient for the area. Whennull
, the series'color
is used with the series'fillOpacity
.- Since:
- 10.2.1.0
-
setFillColor
public void setFillColor(LinearGradient color)
Sets fill color or gradient for the area. Whennull
, the series'color
is used with the series'fillOpacity
.- Since:
- 10.2.1.0
-
setFillColor
public void setFillColor(RadialGradient color)
Sets fill color or gradient for the area. Whennull
, the series'color
is used with the series'fillOpacity
.- Since:
- 10.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.
- Since:
- 10.2.1.0
-
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.
- Since:
- 10.2.1.0
-
getInnerSize
public Object getInnerSize()
In circular view, returns the size of the inner diameter of the circle. Can be a percentage or pixel value. Percentages are relative to the outer perimeter. Pixel values are given as integers. If thegetRows()
option is set, it overrides the innerSize setting.Default: "40%"
-
setInnerSize
public void setInnerSize(String innerSize)
In circular view, sets the size of the inner diameter of the circle. Can be a percentage. Percentages are relative to the outer perimeter. If thegetRows()
option is set, it overrides the innerSize setting.
-
setInnerSize
public void setInnerSize(int innerSize)
In circular view, sets the size of the inner diameter of the circle. Can be a pixel value. Pixel values are given as integers. If thegetRows()
option is set, it overrides the innerSize setting.
-
getItemPadding
public Number getItemPadding()
Returns the padding between the items, given in relative size where the size of the item is 1.Default:
0.1
- Since:
- 10.2.1.0
-
setItemPadding
public void setItemPadding(Number itemPadding)
Sets the padding between the items, given in relative size where the size of the item is 1.Default:
0.1
- Since:
- 10.2.1.0
-
getLayout
public String getLayout()
Returns the layout of the items in rectangular view. Can be either horizontal or verticalDefault: "vertical"
-
setLayout
public void setLayout(String layout)
Sets the layout of the items in rectangular view. Can be either horizontal or vertical
-
getRows
public Number getRows()
Returns the number of rows to display in the rectangular or circular view. If thegetInnerSize()
is set, it will be overridden by the rows setting.Default: null
-
setRows
public void setRows(Number rows)
Sets the number of rows to display in the rectangular or circular view. If thegetInnerSize()
is set, it will be overridden by the rows setting.
-
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
- Since:
- 10.2.1.0
-
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
- Since:
- 10.2.1.0
-
getStartAngle
public Number getStartAngle()
In circular view, returns the start angle of the item layout, in degrees where 0 is up. Default: null
-
setStartAngle
public void setStartAngle(Number startAngle)
In circular view, sets the start angle of the item layout, in degrees where 0 is up.
-
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 behaviour is to scale to the plot area and give room for data labels within the plot area. slicedOffset is also included in the default size calculation. 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%"
.Defaults to
null
.- Since:
- 10.2.1.0
-
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 behaviour is to scale to the plot area and give room for data labels within the plot area. slicedOffset is also included in the default size calculation. 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%"
.Defaults to
null
.- Since:
- 10.2.1.0
-
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 behaviour is to scale to the plot area and give room for data labels within the plot area. slicedOffset is also included in the default size calculation. 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%"
.Defaults to
null
.- Since:
- 10.2.1.0
-
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
-
-