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 StringgetConnectorColor()Returns the color of the line connecting the data label to the pie slice.NumbergetConnectorPadding()Returns the distance from the data label to the connector.NumbergetConnectorWidth()Returns the width of the line connecting the data label to the pie slice.ObjectgetDistance()Returns the distance of the data labels which is used for Pie chart only.booleanisEnabled()Returns enable or disable the data labels.voidsetConnectorColor(String connectorColor)Sets the color of the line connecting the data label to the pie slice.voidsetConnectorPadding(Number connectorPadding)Sets the distance from the data label to the connector.voidsetConnectorWidth(Number connectorWidth)Sets the width of the line connecting the data label to the pie slice.voidsetDistance(Number distance)Sets the distance of the data labels which is used for Pie chart only.voidsetDistance(String distance)Sets the distance of the data labels which is used for Pie chart only.voidsetEnabled(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, getHeaders, 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, setHeaders, 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:
setConnectorWidthin classDataLabels
-
getConnectorWidth
public Number getConnectorWidth()
Returns the width of the line connecting the data label to the pie slice.Defaults to 1
- Overrides:
getConnectorWidthin 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:
setConnectorColorin 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:
getConnectorColorin classDataLabels
-
getDistance
public Object getDistance()
Returns the distance of the data labels which is used for Pie chart only.Default: 30
- Overrides:
getDistancein classDataLabels
-
setDistance
public void setDistance(Number distance)
Sets the distance of the data labels which is used for Pie chart only.- Overrides:
setDistancein 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:
setDistancein classDataLabels- Since:
- 7.2.1.0
-
isEnabled
public boolean isEnabled()
Returns enable or disable the data labels.Default: true
- Overrides:
isEnabledin classDataLabels
-
setEnabled
public void setEnabled(boolean enabled)
Sets enable or disable the data labels.Default: true
- Overrides:
setEnabledin classDataLabels
-
-