public class DataLabelsRange extends AbstractDataLabels
x
and y
options. Instead, they have
xLow
, xHigh
, yLow
and
yHigh
options to allow the higher and lower data label sets
individually.OVERFLOW_JUSTIFY, OVERFLOW_NONE
Constructor and Description |
---|
DataLabelsRange() |
DataLabelsRange(Boolean enabled) |
Modifier and Type | Method and Description |
---|---|
HorizontalAlign |
getAlign() |
Boolean |
getAllowOverlap() |
String |
getClassName() |
Boolean |
getCrop() |
Boolean |
getDefer() |
Boolean |
getEnabled() |
String |
getFormat() |
String |
getFormatter() |
Boolean |
getInside() |
String |
getOverflow() |
Number |
getPadding() |
Number |
getRotation() |
Boolean |
getShadow() |
Shape |
getShape() |
Boolean |
getUseHTML() |
VerticalAlign |
getVerticalAlign() |
Number |
getXHigh() |
Number |
getXLow() |
Number |
getYHigh() |
Number |
getYLow() |
Number |
getZIndex() |
void |
setAlign(HorizontalAlign align)
The alignment of the data label compared to the point.
|
void |
setAllowOverlap(Boolean allowOverlap)
Whether to allow data labels to overlap.
|
void |
setClassName(String className)
A class name for the data label.
|
void |
setCrop(Boolean crop)
Whether to hide data labels that are outside the plot area.
|
void |
setDefer(Boolean defer)
Whether to defer displaying the data labels until the initial series
animation has finished.
|
void |
setEnabled(Boolean enabled)
Enable or disable the data labels.
|
void |
setFormat(String format)
A format string for the data label.
|
void |
setFormatter(String _fn_formatter)
Callback JavaScript function to format the data label.
|
void |
setInside(Boolean inside)
For points with an extent, like columns, whether to align the data label
inside the box or to the actual value point.
|
void |
setOverflow(String overflow)
How to handle data labels that flow outside the plot area.
|
void |
setPadding(Number padding)
When either the
borderWidth or the
backgroundColor is set, this is the padding within the box. |
void |
setRotation(Number rotation)
Text rotation in degrees.
|
void |
setShadow(Boolean shadow)
The shadow of the box.
|
void |
setShape(Shape shape)
The name of a symbol to use for the border around the label.
|
void |
setUseHTML(Boolean useHTML)
Whether to use HTML to render the labels.
|
void |
setVerticalAlign(VerticalAlign verticalAlign)
The vertical alignment of a data label.
|
void |
setXHigh(Number xHigh)
X offset of the higher data labels relative to the point value.
|
void |
setXLow(Number xLow)
X offset of the lower data labels relative to the point value.
|
void |
setYHigh(Number yHigh)
Y offset of the higher data labels relative to the point value.
|
void |
setYLow(Number yLow)
Y offset of the lower data labels relative to the point value.
|
void |
setZIndex(Number zIndex)
The Z index of the data labels.
|
public DataLabelsRange()
public DataLabelsRange(Boolean enabled)
public HorizontalAlign getAlign()
setAlign(HorizontalAlign)
public void setAlign(HorizontalAlign align)
right
, the right side of the label should be touching the
point. For points with an extent, like columns, the alignments also
dictates how to align it inside the box, as given with the
inside option. Can be
one of "left", "center" or "right".
Defaults to: center
public Boolean getAllowOverlap()
setAllowOverlap(Boolean)
public void setAllowOverlap(Boolean allowOverlap)
Defaults to: false
public String getClassName()
getClassName
in class AbstractDataLabels
setClassName(String)
public void setClassName(String className)
setClassName
in class AbstractDataLabels
public Boolean getCrop()
getCrop
in class AbstractDataLabels
setCrop(Boolean)
public void setCrop(Boolean crop)
Defaults to: true
setCrop
in class AbstractDataLabels
public Boolean getDefer()
getDefer
in class AbstractDataLabels
setDefer(Boolean)
public void setDefer(Boolean defer)
Defaults to: true
setDefer
in class AbstractDataLabels
public Boolean getEnabled()
getEnabled
in class AbstractDataLabels
setEnabled(Boolean)
public void setEnabled(Boolean enabled)
Defaults to: false
setEnabled
in class AbstractDataLabels
public String getFormat()
getFormat
in class AbstractDataLabels
setFormat(String)
public void setFormat(String format)
formatter
.
Defaults to: {y}
setFormat
in class AbstractDataLabels
public String getFormatter()
getFormatter
in class AbstractDataLabels
AbstractDataLabels.setFormatter(String)
public void setFormatter(String _fn_formatter)
AbstractDataLabels
format
is defined, the format takes precedence and the
formatter is ignored.setFormatter
in class AbstractDataLabels
public Boolean getInside()
getInside
in class AbstractDataLabels
setInside(Boolean)
public void setInside(Boolean inside)
false
in most cases, true
in stacked columns.setInside
in class AbstractDataLabels
public String getOverflow()
getOverflow
in class AbstractDataLabels
setOverflow(String)
public void setOverflow(String overflow)
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, set crop
to false
and overflow
to "none"
.
Defaults to: justify
setOverflow
in class AbstractDataLabels
public Number getPadding()
getPadding
in class AbstractDataLabels
setPadding(Number)
public void setPadding(Number padding)
borderWidth
or the
backgroundColor
is set, this is the padding within the box.
Defaults to: 5
setPadding
in class AbstractDataLabels
public Number getRotation()
getRotation
in class AbstractDataLabels
setRotation(Number)
public void setRotation(Number rotation)
Defaults to: 0
setRotation
in class AbstractDataLabels
public Boolean getShadow()
getShadow
in class AbstractDataLabels
setShadow(Boolean)
public void setShadow(Boolean shadow)
borderWidth
or
backgroundColor
. Since 2.3 the shadow can be an object
configuration containing color
, offsetX
,
offsetY
, opacity
and width
.
Defaults to: false
setShadow
in class AbstractDataLabels
public Shape getShape()
getShape
in class AbstractDataLabels
setShape(Shape)
public void setShape(Shape shape)
Defaults to: square
setShape
in class AbstractDataLabels
public Boolean getUseHTML()
getUseHTML
in class AbstractDataLabels
setUseHTML(Boolean)
public void setUseHTML(Boolean useHTML)
Defaults to: false
setUseHTML
in class AbstractDataLabels
public VerticalAlign getVerticalAlign()
getVerticalAlign
in class AbstractDataLabels
setVerticalAlign(VerticalAlign)
public void setVerticalAlign(VerticalAlign verticalAlign)
top
,
middle
or bottom
. The default value depends on
the data, for instance in a column chart, the label is above positive
values and below negative values.setVerticalAlign
in class AbstractDataLabels
public Number getXHigh()
setXHigh(Number)
public void setXHigh(Number xHigh)
Defaults to: 0
public Number getXLow()
setXLow(Number)
public void setXLow(Number xLow)
Defaults to: 0
public Number getYHigh()
setYHigh(Number)
public void setYHigh(Number yHigh)
Defaults to: -6
public Number getYLow()
setYLow(Number)
public void setYLow(Number yLow)
Defaults to: 16
public Number getZIndex()
getZIndex
in class AbstractDataLabels
setZIndex(Number)
public void setZIndex(Number zIndex)
Defaults to: 6
setZIndex
in class AbstractDataLabels
Copyright © 2025. All rights reserved.