Package org.zkoss.chart.plotOptions
Class PieDataLabels
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.DataLabels
-
- org.zkoss.chart.plotOptions.PieDataLabels
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
- Direct Known Subclasses:
FunnelDataLabels
public class PieDataLabels extends DataLabels
An option of data labels used for Pie and FunnelAll 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
-
-
Constructor Summary
Constructors Constructor Description PieDataLabels()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getConnectorColor()
Returns the color of the line connecting the data label to the pie slice.Number
getConnectorPadding()
Returns the distance from the data label to the connector.Number
getConnectorWidth()
Returns the width of the line connecting the data label to the pie slice.Object
getDistance()
Returns the distance of the data labels which is used for Pie chart only.boolean
isEnabled()
Returns enable or disable the data labels.void
setConnectorColor(String connectorColor)
Sets the color of the line connecting the data label to the pie slice.void
setConnectorPadding(Number connectorPadding)
Sets the distance from the data label to the connector.void
setConnectorWidth(Number connectorWidth)
Sets the width of the line connecting the data label to the pie slice.void
setDistance(Number distance)
Sets the distance of the data labels which is used for Pie chart only.void
setDistance(String distance)
Sets the distance of the data labels which is used for Pie chart only.void
setEnabled(boolean enabled)
Sets enable or disable the data labels.-
Methods inherited from class org.zkoss.chart.plotOptions.DataLabels
getAlign, getAllowOverlap, getBackgroundColor, getBorderColor, getBorderRadius, getBorderWidth, getColor, getConnectorShape, getDefer, getFilter, getFormat, getFormatter, getLinkFormat, getLinkTextPath, getNodeFormat, getNodeFormatter, getNullFormat, getNullFormatter, getOverflow, getPadding, getPointFormat, getRotation, getRotationMode, getShadow, getShape, getStyle, getTextPath, getVerticalAlign, getX, getY, getZIndex, isAlternate, isCrop, isInside, isShadow, isSoftConnector, isUseHTML, setAlign, setAllowOverlap, setAlternate, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBackgroundColor, setBorderColor, setBorderColor, setBorderColor, setBorderColor, setBorderRadius, setBorderRadius, setBorderWidth, setColor, setColor, setColor, setColor, setConnectorShape, setCrop, setDefer, setFilter, setFormat, setFormatter, setInside, setLinkFormat, setLinkTextPath, setNodeFormat, setNodeFormatter, setNullFormat, setNullFormatter, setOverflow, setPadding, setPointFormat, setRotation, setRotation, setRotationMode, setShadow, setShadow, setShape, setSoftConnector, setStyle, setStyle, setTextPath, setUseHTML, setVerticalAlign, setX, setY, setZIndex
-
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
-
setConnectorPadding
public void setConnectorPadding(Number connectorPadding)
Sets the distance from the data label to the connector.Defaults to 5.
-
getConnectorPadding
public Number getConnectorPadding()
Returns the distance from the data label to the connector.Defaults to 5.
-
setConnectorWidth
public void setConnectorWidth(Number connectorWidth)
Sets the width of the line connecting the data label to the pie slice.Defaults to 1
- Overrides:
setConnectorWidth
in classDataLabels
-
getConnectorWidth
public Number getConnectorWidth()
Returns the width of the line connecting the data label to the pie slice.Defaults to 1
- Overrides:
getConnectorWidth
in classDataLabels
-
setConnectorColor
public void setConnectorColor(String connectorColor)
Sets the color of the line connecting the data label to the pie slice. The default color is the same as the point's color.Defaults to {point.color}.
- Overrides:
setConnectorColor
in classDataLabels
-
getConnectorColor
public String getConnectorColor()
Returns the color of the line connecting the data label to the pie slice. The default color is the same as the point's color.Defaults to {point.color}.
- Overrides:
getConnectorColor
in classDataLabels
-
getDistance
public Object getDistance()
Returns the distance of the data labels which is used for Pie chart only.Default: 30
- Overrides:
getDistance
in classDataLabels
-
setDistance
public void setDistance(Number distance)
Sets the distance of the data labels which is used for Pie chart only.- Overrides:
setDistance
in classDataLabels
-
setDistance
public void setDistance(String distance)
Sets the distance of the data labels which is used for Pie chart only. Can also be defined as a percentage of pie's radius.- Overrides:
setDistance
in classDataLabels
- Since:
- 7.2.1.0
-
isEnabled
public boolean isEnabled()
Returns enable or disable the data labels.Default: true
- Overrides:
isEnabled
in classDataLabels
-
setEnabled
public void setEnabled(boolean enabled)
Sets enable or disable the data labels.Default: true
- Overrides:
setEnabled
in classDataLabels
-
-