Class DataLabels
- java.lang.Object
-
- org.zkoss.chart.Optionable
-
- org.zkoss.chart.plotOptions.DataLabels
-
- All Implemented Interfaces:
Serializable
,OptionDataListener
,org.zkoss.json.JSONAware
- Direct Known Subclasses:
BarDataLabels
,NetworkGraphDataLabels
,PackedBubbleDataLabels
,PieDataLabels
,RangeDataLabels
,SankeyDataLabels
,SunburstDataLabels
public class DataLabels extends Optionable
An option of data labels used forSeries
All the options in this class support
DynamicalAttribute
.- Author:
- RaymondChao, jumperchen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.chart.Optionable
NOT_NULL_VALUE, options
-
-
Constructor Summary
Constructors Constructor Description DataLabels()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAlign()
Returns the alignment of the data label compared to the point.boolean
getAllowOverlap()
Whether to allow data labels to overlap.Color
getBackgroundColor()
Returns the background color for the data label.Color
getBorderColor()
Returns the border color for the data label.Object
getBorderRadius()
Returns the border radius in pixels for the data label.Number
getBorderWidth()
Returns the border width in pixels for the data label.Color
getColor()
Returns the text color for the data labels.String
getConnectorColor()
Returns the color of the line connecting the data label to the pie slice.String
getConnectorShape()
Returns specifies the method that is used to generate the connector path.Number
getConnectorWidth()
Returns the width of the line connecting the data label to the point.boolean
getDefer()
Return whether to defer displaying the data labels until the initial series animation has finished.Object
getDistance()
Returns the distance of the data labels which is used for Pie chart only.DataLabelsFilter
getFilter()
Returns a declarative filter to control of which data labels to display, if any.String
getFormat()
Returns a format string for the data label.org.zkoss.json.JavaScriptValue
getFormatter()
Returns a callback JavaScript function to format the data label.String
getLinkFormat()
Returns the format string specifying what to show for links in the networkgraph.DataLabelsTextPath
getLinkTextPath()
Returns the options for a link label text which should follow link connection, if any.String
getNodeFormat()
Returns the format string specifying what to show for nodes.org.zkoss.json.JavaScriptValue
getNodeFormatter()
Returns the callback to format data labels for nodes in the sankey diagram.String
getNullFormat()
Returns the format for points with the value of null.org.zkoss.json.JavaScriptValue
getNullFormatter()
Returns the callback JavaScript function that defines formatting for points with the value of null.String
getOverflow()
Returns how to handle data labels that flow outside the plot area.Number
getPadding()
Returns when either thegetBorderWidth()
or thegetBackgroundColor()
is set, this is the padding within the box.String
getPointFormat()
Returns the point format of DataLabels.Object
getRotation()
Returns text rotation in degrees.String
getRotationMode()
Returns a rotationMode on all points which lies on the same level.Shadow
getShadow()
Returns whether to apply a drop shadow to the outer chart area.String
getShape()
Return the name of a symbol to use for the border around the label.<K,V>
Map<K,V>getStyle()
Returns styles for the label.DataLabelsTextPath
getTextPath()
Returns options for a label text which should follow marker's shape, if any.String
getVerticalAlign()
Returns the vertical alignment of a data label.Number
getX()
Returns the x position offset of the label relative to the point.Number
getY()
Returns the y position offset of the label relative to the point.Number
getZIndex()
Returns the Z index of the data labels.boolean
isAlternate()
Returns whether to position data labels alternately.boolean
isCrop()
Returns whether to hide data labels that are outside the plot area.boolean
isEnabled()
Returns enable or disable the data labels.boolean
isInside()
Returns for points with an extent, like columns, whether to align the data label inside the box or to the actual value point.boolean
isShadow()
Returns whether to apply a drop shadow to the data label area.boolean
isSoftConnector()
Returns whether to enable soft connector.boolean
isUseHTML()
Return whether to use HTML to render the labels.void
setAlign(String align)
Sets the alignment of the data label compared to the point.void
setAllowOverlap(Boolean allowOverlap)
Whether to allow data labels to overlap.void
setAlternate(boolean alternate)
Sets whether to position data labels alternately.void
setBackgroundColor(String color)
Sets the background color for the data label.void
setBackgroundColor(Color color)
Sets the background color for the data label.void
setBackgroundColor(LinearGradient color)
Sets the background color for the data label.void
setBackgroundColor(RadialGradient color)
Sets the background color for the data label.void
setBorderColor(String color)
Sets the border color for the data label.void
setBorderColor(Color color)
Sets the border color for the data label.void
setBorderColor(LinearGradient color)
Sets the border color for the data label.void
setBorderColor(RadialGradient color)
Sets the border color for the data label.void
setBorderRadius(Number borderRadius)
Sets the border radius in pixels for the data label.void
setBorderRadius(String borderRadius)
Sets the border radius in pixels for the data label.void
setBorderWidth(Number borderWidth)
Sets the border width in pixels for the data label.void
setColor(String color)
Sets the text color for the data labels.void
setColor(Color color)
Sets the text color for the data labels.void
setColor(LinearGradient color)
Sets the text color for the data labels.void
setColor(RadialGradient color)
Sets the text color for the data labels.void
setConnectorColor(String connectorColor)
Sets the color of the line connecting the data label to the pie slice.void
setConnectorShape(String connectorShape)
Sets specifies the method that is used to generate the connector path.void
setConnectorWidth(Number connectorWidth)
Sets the width of the line connecting the data label to the point.void
setCrop(boolean crop)
Sets whether to hide data labels that are outside the plot area.void
setDefer(Boolean defer)
Set whether to defer displaying the data labels until the initial series animation has finished.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.void
setFilter(DataLabelsFilter filter)
Sets a declarative filter to control of which data labels to display.void
setFormat(String format)
Sets a format string for the data label.void
setFormatter(org.zkoss.json.JavaScriptValue formatter)
Sets a callback JavaScript function to format the data label.void
setInside(boolean inside)
Sets for points with an extent, like columns, whether to align the data label inside the box or to the actual value point.void
setLinkFormat(String linkFormat)
Sets the format string specifying what to show for links in the networkgraph.void
setLinkTextPath(DataLabelsTextPath linkTextPath)
Sets the options for a link label text which should follow link connection.void
setNodeFormat(String nodeFormat)
Sets the format string specifying what to show for nodes.void
setNodeFormatter(org.zkoss.json.JavaScriptValue nodeFormatter)
Sets the callback to format data labels for nodes in the sankey diagram.void
setNullFormat(String nullFormat)
Sets the format for points with the value of null.void
setNullFormatter(org.zkoss.json.JavaScriptValue nullFormatter)
Sets the callback JavaScript function that defines formatting for points with the value of null.void
setOverflow(String overflow)
Returns how to handle data labels that flow outside the plot area.void
setPadding(int padding)
Sets when either thegetBorderWidth()
or thegetBackgroundColor()
is set, this is the padding within the box.void
setPointFormat(String pointFormat)
Sets the point format of DataLabels.void
setRotation(Number rotation)
Sets text rotation in degrees.void
setRotation(String rotation)
Sets text rotation in degrees.void
setRotationMode(String rotationMode)
Sets a rotationMode on all points which lies on the same level.void
setShadow(boolean shadow)
Sets whether to apply a drop shadow to the outer chart area.void
setShadow(Shadow shadow)
Sets whether to apply a drop shadow to the outer chart area.void
setShape(String shape)
Set the name of a symbol to use for the border around the label.void
setSoftConnector(boolean softConnector)
Sets to enable soft connector.void
setStyle(String style)
Set styles for the label.<K,V>
voidsetStyle(Map<K,V> style)
Set styles for the label.void
setTextPath(DataLabelsTextPath textPath)
Sets options for a label text which should follow marker's shape.void
setUseHTML(boolean useHTML)
Sets whether to use HTML to render the labels.void
setVerticalAlign(String verticalAlign)
Sets the vertical alignment of a data label.void
setX(Number x)
Sets the x position offset of the label relative to the point.void
setY(Number y)
Sets the y position offset of the label relative to the point.void
setZIndex(Number zIndex)
Sets the Z index of the data labels.-
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
-
getAlign
public String getAlign()
Returns the alignment of the data label compared to the point. Can be one of "left", "center" or "right".Defaults to
"center"
.
-
setAlign
public void setAlign(String align)
Sets the alignment of the data label compared to the point. Can be one of "left", "center" or "right". Defaults to"center"
. 'align the alignment of the data label compared to the point. Can be one of "left", "center" or "right".Defaults to
"center"
.
-
getAllowOverlap
public boolean getAllowOverlap()
Whether to allow data labels to overlap. To make the labels less sensitive for overlapping, the dataLabels.padding can be set to 0.Defaults to false.
-
setAllowOverlap
public void setAllowOverlap(Boolean allowOverlap)
Whether to allow data labels to overlap. To make the labels less sensitive for overlapping, the dataLabels.padding can be set to 0.Defaults to false.
-
isAlternate
public boolean isAlternate()
Returns whether to position data labels alternately. For example, if distance is set equal to 100, then data labels will be positioned alternately (on both sides of the point) at a distance of 100px.Default: true
- Since:
- 7.2.1.0
-
setAlternate
public void setAlternate(boolean alternate)
Sets whether to position data labels alternately. For example, if distance is set equal to 100, then data labels will be positioned alternately (on both sides of the point) at a distance of 100px.- Since:
- 7.2.1.0
-
getBackgroundColor
public Color getBackgroundColor()
Returns the background color for the data label.Defaults to null.
-
setBackgroundColor
public void setBackgroundColor(Color color)
Sets the background color for the data label.Defaults to null.
-
setBackgroundColor
public void setBackgroundColor(String color)
Sets the background color for the data label.Defaults to null.
-
setBackgroundColor
public void setBackgroundColor(LinearGradient color)
Sets the background color for the data label.Defaults to null.
-
setBackgroundColor
public void setBackgroundColor(RadialGradient color)
Sets the background color for the data label.Defaults to null.
-
getBorderColor
public Color getBorderColor()
Returns the border color for the data label.Default: null
-
setBorderColor
public void setBorderColor(Color color)
Sets the border color for the data label.Default: null
-
setBorderColor
public void setBorderColor(String color)
Sets the border color for the data label.Default: null
-
setBorderColor
public void setBorderColor(LinearGradient color)
Sets the border color for the data label.Default: null
-
setBorderColor
public void setBorderColor(RadialGradient color)
Sets the border color for the data label.Default: null
-
getBorderRadius
public Object getBorderRadius()
Returns the border radius in pixels for the data label.Default: 0
-
setBorderRadius
public void setBorderRadius(Number borderRadius)
Sets the border radius in pixels for the data label.
-
setBorderRadius
public void setBorderRadius(String borderRadius)
Sets the border radius in pixels for the data label.
-
getBorderWidth
public Number getBorderWidth()
Returns the border width in pixels for the data label.Default: 0
-
setBorderWidth
public void setBorderWidth(Number borderWidth)
Sets the border width in pixels for the data label.Default: 0
-
getColor
public Color getColor()
Returns the text color for the data labels.Default: null
-
setColor
public void setColor(Color color)
Sets the text color for the data labels.
-
setColor
public void setColor(String color)
Sets the text color for the data labels.
-
setColor
public void setColor(LinearGradient color)
Sets the text color for the data labels.
-
setColor
public void setColor(RadialGradient color)
Sets the text color for the data labels.
-
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.Default: null
-
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.
-
getConnectorShape
public String getConnectorShape()
Returns specifies the method that is used to generate the connector path.Highcharts provides 3 built-in connector shapes:
'crookedLine'
(default since v11),'fixedOffset'
and'straight'
.Default: "crookedLine"
- Since:
- 11.2.0.0
-
setConnectorShape
public void setConnectorShape(String connectorShape)
Sets specifies the method that is used to generate the connector path.Highcharts provides 3 built-in connector shapes:
'crookedLine'
(default since v11),'fixedOffset'
and'straight'
.- Since:
- 11.2.0.0
-
getConnectorWidth
public Number getConnectorWidth()
Returns the width of the line connecting the data label to the point.Default: 1
- Since:
- 7.2.1.0
-
setConnectorWidth
public void setConnectorWidth(Number connectorWidth)
Sets the width of the line connecting the data label to the point.- Since:
- 7.2.1.0
-
isCrop
public boolean isCrop()
Returns whether to hide data labels that are outside the plot area. By default, the data label is moved inside the plot area according to thesetOverflow(String)
option.Default: true
-
setCrop
public void setCrop(boolean crop)
Sets whether to hide data labels that are outside the plot area. By default, the data label is moved inside the plot area according to thesetOverflow(String)
option.Default: true
-
getDefer
public boolean getDefer()
Return whether to defer displaying the data labels until the initial series animation has finished.Defaults to true.
-
setDefer
public void setDefer(Boolean defer)
Set whether to defer displaying the data labels until the initial series animation has finished.Defaults to true.
-
getDistance
public Object getDistance()
Returns the distance of the data labels which is used for Pie chart only.Default: 0
-
setDistance
public void setDistance(Number distance)
Sets the distance of the data labels which is used for Pie chart only.
-
setDistance
public void setDistance(String distance)
Sets the distance of the data labels which is used for Pie chart only.- Since:
- 7.2.1.0
-
isEnabled
public boolean isEnabled()
Returns enable or disable the data labels.Default: false
-
setEnabled
public void setEnabled(boolean enabled)
Sets enable or disable the data labels.Default: false
-
getFilter
public DataLabelsFilter getFilter()
Returns a declarative filter to control of which data labels to display, if any. Otherwise, create a new one. The declarative filter is designed for use when callback functions are not available, like when the chart options require a pure JSON structure or for use with graphical editors. For programmatic control, use the formatter instead, and return undefined to disable a single data label.- Since:
- 7.2.1.0
-
setFilter
public void setFilter(DataLabelsFilter filter)
Sets a declarative filter to control of which data labels to display.- Since:
- 7.2.1.0
-
getFormat
public String getFormat()
Returns a format string for the data label.
-
setFormat
public void setFormat(String format)
Sets a format string for the data label.
-
getFormatter
public org.zkoss.json.JavaScriptValue getFormatter()
Returns a callback JavaScript function to format the data label. Note that if a format is defined, the format takes precedence and the formatter is ignored.Default: null
- Since:
- 7.2.1.0
-
setFormatter
public void setFormatter(org.zkoss.json.JavaScriptValue formatter)
Sets a callback JavaScript function to format the data label. Note that if a format is defined, the format takes precedence and the formatter is ignored.- Since:
- 7.2.1.0
-
isInside
public boolean isInside()
Returns for points with an extent, like columns, whether to align the data label inside the box or to the actual value point.Defaults to
false
in most cases,true
in stacked columns.
-
setInside
public void setInside(boolean inside)
Sets for points with an extent, like columns, whether to align the data label inside the box or to the actual value point. Defaults tofalse
in most cases,true
in stacked columns. 'inside for points with an extent, like columns, whether to align the data label inside the box or to the actual value point.Defaults to
false
in most cases,true
in stacked columns.
-
getLinkFormat
public String getLinkFormat()
Returns the format string specifying what to show for links in the networkgraph.Default: null
- Since:
- 7.2.1.0
-
setLinkFormat
public void setLinkFormat(String linkFormat)
Sets the format string specifying what to show for links in the networkgraph.- Since:
- 7.2.1.0
-
getLinkTextPath
public DataLabelsTextPath getLinkTextPath()
Returns the options for a link label text which should follow link connection, if any. Otherwise, create a new one. Note: Only SVG-based renderer supports this option.- Since:
- 7.2.1.0
-
setLinkTextPath
public void setLinkTextPath(DataLabelsTextPath linkTextPath)
Sets the options for a link label text which should follow link connection. Note: Only SVG-based renderer supports this option.- Since:
- 7.2.1.0
-
getNodeFormat
public String getNodeFormat()
Returns the format string specifying what to show for nodes. By default the nodeFormatter returns{point.name}
.Default:
null
- Since:
- 10.2.1.0
-
setNodeFormat
public void setNodeFormat(String nodeFormat)
Sets the format string specifying what to show for nodes. By default the nodeFormatter returns{point.name}
.Default:
null
- Since:
- 10.2.1.0
-
getNodeFormatter
public org.zkoss.json.JavaScriptValue getNodeFormatter()
Returns the callback to format data labels for nodes in the sankey diagram. ThenodeFormat
option takes precedence over thenodeFormatter
.Default:
null
- Since:
- 10.2.1.0
-
setNodeFormatter
public void setNodeFormatter(org.zkoss.json.JavaScriptValue nodeFormatter)
Sets the callback to format data labels for nodes in the sankey diagram. ThenodeFormat
option takes precedence over thenodeFormatter
.Default:
null
- Since:
- 10.2.1.0
-
getNullFormat
public String getNullFormat()
Returns the format for points with the value of null. Works analogously to format.nullFormat
can be applied only to series which support displaying null points.Default:
null
- Since:
- 10.2.1.0
-
setNullFormat
public void setNullFormat(String nullFormat)
Sets the format for points with the value of null. Works analogously to format.nullFormat
can be applied only to series which support displaying null points.Default:
null
- Since:
- 10.2.1.0
-
getNullFormatter
public org.zkoss.json.JavaScriptValue getNullFormatter()
Returns the callback JavaScript function that defines formatting for points with the value of null. Works analogously to formatter.nullPointFormatter
can be applied only to series which support displaying null points.Default:
null
- Since:
- 10.2.1.0
-
setNullFormatter
public void setNullFormatter(org.zkoss.json.JavaScriptValue nullFormatter)
Sets the callback JavaScript function that defines formatting for points with the value of null. Works analogously to formatter.nullPointFormatter
can be applied only to series which support displaying null points.Default:
null
- Since:
- 10.2.1.0
-
getOverflow
public String getOverflow()
Returns how to handle data labels that flow outside the plot area.The default is
justify
, which aligns them inside the plot area. For columns and bars, this means it will be moved inside the bar. To display data labels outside the plot area, setcrop
tofalse
andoverflow
to"none"
.
-
setOverflow
public void setOverflow(String overflow)
Returns how to handle data labels that flow outside the plot area.The default is
justify
, which aligns them inside the plot area. For columns and bars, this means it will be moved inside the bar. To display data labels outside the plot area, setsetCrop(boolean)
tofalse
andsetOverflow(String)
to"none"
.
-
getPadding
public Number getPadding()
Returns when either thegetBorderWidth()
or thegetBackgroundColor()
is set, this is the padding within the box.Default: 2
-
getPointFormat
public String getPointFormat()
Returns the point format of DataLabels.Default: null
- Since:
- 11.2.0.0
-
setPointFormat
public void setPointFormat(String pointFormat)
Sets the point format of DataLabels.- Since:
- 11.2.0.0
-
setPadding
public void setPadding(int padding)
Sets when either thegetBorderWidth()
or thegetBackgroundColor()
is set, this is the padding within the box.
-
getRotation
public Object getRotation()
Returns text rotation in degrees. Note that due to a more complex structure, backgrounds and borders will be lost on a rotated data label.Default: 0
-
setRotation
public void setRotation(Number rotation)
Sets text rotation in degrees. Note that due to a more complex structure, backgrounds and borders will be lost on a rotated data label.
-
setRotation
public void setRotation(String rotation)
Sets text rotation in degrees. Note that due to a more complex structure, backgrounds and borders will be lost on a rotated data label.
-
getRotationMode
public String getRotationMode()
Returns a rotationMode on all points which lies on the same level.Default: null
- Since:
- 7.2.1.0
-
setRotationMode
public void setRotationMode(String rotationMode)
Sets a rotationMode on all points which lies on the same level.- Since:
- 7.2.1.0
-
isShadow
public boolean isShadow()
Returns whether to apply a drop shadow to the data label area. Works best with borderWidth or backgroundColor.Default: false.
- See Also:
Shadow
-
getShadow
public Shadow getShadow()
Returns whether to apply a drop shadow to the outer chart area. Works best with borderWidth or backgroundColor.Default:
Shadow.NONE
.- See Also:
Shadow
-
setShadow
public void setShadow(boolean shadow)
Sets whether to apply a drop shadow to the outer chart area. Works best with borderWidth or backgroundColor.
-
setShadow
public void setShadow(Shadow shadow)
Sets whether to apply a drop shadow to the outer chart area. Works best with borderWidth or backgroundColor.- See Also:
Shadow
-
getShape
public String getShape()
Return the name of a symbol to use for the border around the label. Symbols are predefined functions on the Renderer object.Defaults to square.
-
setShape
public void setShape(String shape)
Set the name of a symbol to use for the border around the label. Symbols are predefined functions on the Renderer object.Defaults to square.
-
isSoftConnector
public boolean isSoftConnector()
Returns whether to enable soft connector. Funnel chart only.
-
setSoftConnector
public void setSoftConnector(boolean softConnector)
Sets to enable soft connector. Funnel chart only.
-
getStyle
public <K,V> Map<K,V> getStyle()
Returns styles for the label. Defaults to:color: 'contrast'; fontSize: '11px'; fontWeight: 'bold'; textShadow: '0 0 6px contrast, 0 0 3px contrast'
- Type Parameters:
K
- type for the keyif style was set using
setStyle(String)
, type will be Stringif style was set using
setStyle(Map)
, type will be the same as the type from the key of the mapif style was not set, default style will be applied, and type will be String
V
- type for the valueif style was set using
setStyle(String)
, type will be Stringif style was set using
setStyle(Map)
, type will be the same as the type from the key of the mapif style was not set, default style will be applied, and type will be String
-
setStyle
public void setStyle(String style)
Set styles for the label. This method allows simple settings likelabel.setStyle("fontWeight: 'bold'; color: 'white'; textShadow: '0px 1px 2px black'");
In the format of CSS key:value, and ";" separating multiple key:value pairs, if you have more a complex CSS styling, we recommend using
setStyle(Map)
- Parameters:
style
- one or many CSS key:value pairs in a single line string format
-
setStyle
public <K,V> void setStyle(Map<K,V> style)
Set styles for the label. This method allows complex styling like:Map<String, Object> styles = new HashMap<String, Object>(); styles.put("fill", "#E8E8EA"); styles.put("stroke", "#6E6E78"); styles.put("stroke-width", "1"); styles.put("r", "0"); Map<String, Object> states = new HashMap<String, Object>(); Map<String, String> hover = new HashMap<String, String>(); hover.put("fill", "#F4F4F6"); hover.put("stroke", "#6E6E78"); hover.put("stroke-width", "1"); hover.put("r", "0"); states.put("hover", hover); styles.put("states", states); Map<String, String> style = new HashMap<String, String>(); style.put("color", "#4D5663"); style.put("fontSize", "12px"); style.put("fontFamily", "'Arial'"); style.put("fontWeight", "normal"); style.put("padding", "10px"); styles.put("style", style);
{ "fill": "#E8E8EA", "stroke": "#6E6E78", "stroke-width": "1", "r": "0", "states": { "hover": { "fill": "#F4F4F6", "stroke": "#6E6E78", "stroke-width": "1", "r": "0" } }, "style": { "color": "#4D5663", "fontSize": "12px", "fontFamily": "'Arial'", "fontWeight": "normal", "padding": "10px" } }
- Type Parameters:
K
- Type for the key, usually StringV
- Type for the value, usually String. For nested maps, use Object or any other type.- Parameters:
style
- the style object
-
getTextPath
public DataLabelsTextPath getTextPath()
Returns options for a label text which should follow marker's shape, if any. Otherwise, create a new one. Border and background are disabled for a label that follows a path. Note: Only SVG-based renderer supports this option. SettinguseHTML
to true will disable this option.- Since:
- 7.2.1.0
-
setTextPath
public void setTextPath(DataLabelsTextPath textPath)
Sets options for a label text which should follow marker's shape. Border and background are disabled for a label that follows a path. Note: Only SVG-based renderer supports this option. SettinguseHTML
to true will disable this option.- Since:
- 7.2.1.0
-
isUseHTML
public boolean isUseHTML()
Return whether to use HTML to render the labels.Defaults to false.
-
setUseHTML
public void setUseHTML(boolean useHTML)
Sets whether to use HTML to render the labels.Defaults to false.
-
getVerticalAlign
public String getVerticalAlign()
Returns the vertical alignment of a data label. Can be one oftop
,middle
orbottom
.The default value depends on the data, for instance in a column chart, the label is above positive values and below negative values.
-
setVerticalAlign
public void setVerticalAlign(String verticalAlign)
Sets the vertical alignment of a data label. Can be one oftop
,middle
,center
orbottom
.The default value depends on the data, for instance in a column chart, the label is above positive values and below negative values.
-
getX
public Number getX()
Returns the x position offset of the label relative to the point.Default: 0
-
setX
public void setX(Number x)
Sets the x position offset of the label relative to the point.Default: 0
-
getY
public Number getY()
Returns the y position offset of the label relative to the point.Default: -6
-
setY
public void setY(Number y)
Sets the y position offset of the label relative to the point.Default: -6
-
getZIndex
public Number getZIndex()
Returns the Z index of the data labels.The default Z index puts it above the series. Use a Z index of 2 to display it behind the series.
Default: 6
-
setZIndex
public void setZIndex(Number zIndex)
Sets the Z index of the data labels.The default Z index puts it above the series. Use a Z index of 2 to display it behind the series.
Default: 6
-
-