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 forSeriesAll 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 StringgetAlign()Returns the alignment of the data label compared to the point.booleangetAllowOverlap()Whether to allow data labels to overlap.ColorgetBackgroundColor()Returns the background color for the data label.ColorgetBorderColor()Returns the border color for the data label.ObjectgetBorderRadius()Returns the border radius in pixels for the data label.NumbergetBorderWidth()Returns the border width in pixels for the data label.ColorgetColor()Returns the text color for the data labels.StringgetConnectorColor()Returns the color of the line connecting the data label to the pie slice.StringgetConnectorShape()Returns specifies the method that is used to generate the connector path.NumbergetConnectorWidth()Returns the width of the line connecting the data label to the point.booleangetDefer()Return whether to defer displaying the data labels until the initial series animation has finished.ObjectgetDistance()Returns the distance of the data labels which is used for Pie chart only.DataLabelsFiltergetFilter()Returns a declarative filter to control of which data labels to display, if any.StringgetFormat()Returns a format string for the data label.org.zkoss.json.JavaScriptValuegetFormatter()Returns a callback JavaScript function to format the data label.booleangetHeaders()Returns the headers of the data labels.StringgetLinkFormat()Returns the format string specifying what to show for links in the networkgraph.DataLabelsTextPathgetLinkTextPath()Returns the options for a link label text which should follow link connection, if any.StringgetNodeFormat()Returns the format string specifying what to show for nodes.org.zkoss.json.JavaScriptValuegetNodeFormatter()Returns the callback to format data labels for nodes in the sankey diagram.StringgetNullFormat()Returns the format for points with the value of null.org.zkoss.json.JavaScriptValuegetNullFormatter()Returns the callback JavaScript function that defines formatting for points with the value of null.StringgetOverflow()Returns how to handle data labels that flow outside the plot area.NumbergetPadding()Returns when either thegetBorderWidth()or thegetBackgroundColor()is set, this is the padding within the box.StringgetPointFormat()Returns the point format of DataLabels.ObjectgetRotation()Returns text rotation in degrees.StringgetRotationMode()Returns a rotationMode on all points which lies on the same level.ShadowgetShadow()Returns whether to apply a drop shadow to the outer chart area.StringgetShape()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.DataLabelsTextPathgetTextPath()Returns options for a label text which should follow marker's shape, if any.StringgetVerticalAlign()Returns the vertical alignment of a data label.NumbergetX()Returns the x position offset of the label relative to the point.NumbergetY()Returns the y position offset of the label relative to the point.NumbergetZIndex()Returns the Z index of the data labels.booleanisAlternate()Returns whether to position data labels alternately.booleanisCrop()Returns whether to hide data labels that are outside the plot area.booleanisEnabled()Returns enable or disable the data labels.booleanisInside()Returns for points with an extent, like columns, whether to align the data label inside the box or to the actual value point.booleanisShadow()Returns whether to apply a drop shadow to the data label area.booleanisSoftConnector()Returns whether to enable soft connector.booleanisUseHTML()Return whether to use HTML to render the labels.voidsetAlign(String align)Sets the alignment of the data label compared to the point.voidsetAllowOverlap(Boolean allowOverlap)Whether to allow data labels to overlap.voidsetAlternate(boolean alternate)Sets whether to position data labels alternately.voidsetBackgroundColor(String color)Sets the background color for the data label.voidsetBackgroundColor(Color color)Sets the background color for the data label.voidsetBackgroundColor(LinearGradient color)Sets the background color for the data label.voidsetBackgroundColor(RadialGradient color)Sets the background color for the data label.voidsetBorderColor(String color)Sets the border color for the data label.voidsetBorderColor(Color color)Sets the border color for the data label.voidsetBorderColor(LinearGradient color)Sets the border color for the data label.voidsetBorderColor(RadialGradient color)Sets the border color for the data label.voidsetBorderRadius(Number borderRadius)Sets the border radius in pixels for the data label.voidsetBorderRadius(String borderRadius)Sets the border radius in pixels for the data label.voidsetBorderWidth(Number borderWidth)Sets the border width in pixels for the data label.voidsetColor(String color)Sets the text color for the data labels.voidsetColor(Color color)Sets the text color for the data labels.voidsetColor(LinearGradient color)Sets the text color for the data labels.voidsetColor(RadialGradient color)Sets the text color for the data labels.voidsetConnectorColor(String connectorColor)Sets the color of the line connecting the data label to the pie slice.voidsetConnectorShape(String connectorShape)Sets specifies the method that is used to generate the connector path.voidsetConnectorWidth(Number connectorWidth)Sets the width of the line connecting the data label to the point.voidsetCrop(boolean crop)Sets whether to hide data labels that are outside the plot area.voidsetDefer(Boolean defer)Set whether to defer displaying the data labels until the initial series animation has finished.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.voidsetFilter(DataLabelsFilter filter)Sets a declarative filter to control of which data labels to display.voidsetFormat(String format)Sets a format string for the data label.voidsetFormatter(org.zkoss.json.JavaScriptValue formatter)Sets a callback JavaScript function to format the data label.voidsetHeaders(boolean headers)Sets the headers of the data labels.voidsetInside(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.voidsetLinkFormat(String linkFormat)Sets the format string specifying what to show for links in the networkgraph.voidsetLinkTextPath(DataLabelsTextPath linkTextPath)Sets the options for a link label text which should follow link connection.voidsetNodeFormat(String nodeFormat)Sets the format string specifying what to show for nodes.voidsetNodeFormatter(org.zkoss.json.JavaScriptValue nodeFormatter)Sets the callback to format data labels for nodes in the sankey diagram.voidsetNullFormat(String nullFormat)Sets the format for points with the value of null.voidsetNullFormatter(org.zkoss.json.JavaScriptValue nullFormatter)Sets the callback JavaScript function that defines formatting for points with the value of null.voidsetOverflow(String overflow)Returns how to handle data labels that flow outside the plot area.voidsetPadding(int padding)Sets when either thegetBorderWidth()or thegetBackgroundColor()is set, this is the padding within the box.voidsetPointFormat(String pointFormat)Sets the point format of DataLabels.voidsetRotation(Number rotation)Sets text rotation in degrees.voidsetRotation(String rotation)Sets text rotation in degrees.voidsetRotationMode(String rotationMode)Sets a rotationMode on all points which lies on the same level.voidsetShadow(boolean shadow)Sets whether to apply a drop shadow to the outer chart area.voidsetShadow(Shadow shadow)Sets whether to apply a drop shadow to the outer chart area.voidsetShape(String shape)Set the name of a symbol to use for the border around the label.voidsetSoftConnector(boolean softConnector)Sets to enable soft connector.voidsetStyle(String style)Set styles for the label.<K,V>
voidsetStyle(Map<K,V> style)Set styles for the label.voidsetTextPath(DataLabelsTextPath textPath)Sets options for a label text which should follow marker's shape.voidsetUseHTML(boolean useHTML)Sets whether to use HTML to render the labels.voidsetVerticalAlign(String verticalAlign)Sets the vertical alignment of a data label.voidsetX(Number x)Sets the x position offset of the label relative to the point.voidsetY(Number y)Sets the y position offset of the label relative to the point.voidsetZIndex(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
falsein most cases,truein 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 tofalsein most cases,truein 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
falsein most cases,truein 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. ThenodeFormatoption 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. ThenodeFormatoption 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.nullFormatcan 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.nullFormatcan 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.nullPointFormattercan 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.nullPointFormattercan 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, setcroptofalseandoverflowto"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)tofalseandsetOverflow(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:
which will generate the final results 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. SettinguseHTMLto 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. SettinguseHTMLto 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,middleorbottom.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,centerorbottom.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
-
getHeaders
public boolean getHeaders()
Returns the headers of the data labels.Whether the data label should act as a group-level header. For leaf nodes, headers are not supported and the data label will be rendered inside.
Default: false
- Since:
- 12.2.0.0
-
setHeaders
public void setHeaders(boolean headers)
Sets the headers of the data labels.Whether the data label should act as a group-level header. For leaf nodes, headers are not supported and the data label will be rendered inside.
Default: false
- Since:
- 12.2.0.0
-
-