public interface PlotHistogramDataLabelsOptions extends Any
.highcharts-data-label-box
and .highcharts-data-label
class names (see
example).Modifier and Type | Interface and Description |
---|---|
static class |
PlotHistogramDataLabelsOptions.Align |
static class |
PlotHistogramDataLabelsOptions.Overflow |
static class |
PlotHistogramDataLabelsOptions.VerticalAlign |
Modifier and Type | Method and Description |
---|---|
PlotHistogramDataLabelsOptions.Align |
getAlign()
(Highcharts) The alignment of the data label compared to the point.
|
boolean |
getAllowOverlap()
(Highcharts) Whether to allow data labels to overlap.
|
Unknown |
getBackgroundColor()
(Highcharts) The background color or gradient for the data label.
|
String |
getBorderColor()
(Highcharts) The border color for the data label.
|
double |
getBorderRadius()
(Highcharts) The border radius in pixels for the data label.
|
double |
getBorderWidth()
(Highcharts) The border width in pixels for the data label.
|
String |
getClassName()
(Highcharts) A class name for the data label.
|
Unknown |
getColor()
(Highcharts) The text color for the data labels.
|
boolean |
getCrop()
(Highcharts) Whether to hide data labels that are outside the plot area.
|
boolean |
getDefer()
(Highcharts, Highstock, Gantt) Whether to defer displaying the data
labels until the initial series animation has finished.
|
boolean |
getEnabled()
(Highcharts) Enable or disable the data labels.
|
PlotHistogramDataLabelsFilterOptions |
getFilter()
(Highcharts) A declarative filter for which data labels to display.
|
String |
getFormat()
(Highcharts) A format string for the data label.
|
FormatterCallbackFunction<SeriesDataLabelsFormatterContextObject> |
getFormatter()
(Highcharts) Callback JavaScript function to format the data label.
|
boolean |
getInside()
(Highcharts) For points with an extent, like columns or map areas,
whether to align the data label inside the box or to the actual value
point.
|
PlotHistogramDataLabelsOptions.Overflow |
getOverflow()
(Highcharts) How to handle data labels that flow outside the plot area.
|
double |
getPadding()
(Highcharts) When either the
borderWidth or the backgroundColor is
set, this is the padding within the box. |
double |
getRotation()
(Highcharts) Text rotation in degrees.
|
Unknown |
getShadow()
(Highcharts) The shadow of the box.
|
String |
getShape()
(Highcharts) The name of a symbol to use for the border around the label.
|
CSSObject |
getStyle()
(Highcharts) Styles for the label.
|
boolean |
getUseHTML()
(Highcharts) Whether to use HTML to render the labels.
|
PlotHistogramDataLabelsOptions.VerticalAlign |
getVerticalAlign()
(Highcharts) The vertical alignment of a data label.
|
double |
getX()
(Highcharts) The x position offset of the label relative to the point in
pixels.
|
double |
getY()
(Highcharts) The y position offset of the label relative to the point in
pixels.
|
double |
getZIndex()
(Highcharts) The Z index of the data labels.
|
void |
setAlign(PlotHistogramDataLabelsOptions.Align value)
(Highcharts) The alignment of the data label compared to the point.
|
void |
setAllowOverlap(boolean value)
(Highcharts) Whether to allow data labels to overlap.
|
void |
setBackgroundColor(Any value)
(Highcharts) The background color or gradient for the data label.
|
void |
setBackgroundColor(GradientColorObject value)
(Highcharts) The background color or gradient for the data label.
|
void |
setBackgroundColor(String value)
(Highcharts) The background color or gradient for the data label.
|
void |
setBorderColor(String value)
(Highcharts) The border color for the data label.
|
void |
setBorderRadius(double value)
(Highcharts) The border radius in pixels for the data label.
|
void |
setBorderWidth(double value)
(Highcharts) The border width in pixels for the data label.
|
void |
setClassName(String value)
(Highcharts) A class name for the data label.
|
void |
setColor(Any value)
(Highcharts) The text color for the data labels.
|
void |
setColor(GradientColorObject value)
(Highcharts) The text color for the data labels.
|
void |
setColor(String value)
(Highcharts) The text color for the data labels.
|
void |
setCrop(boolean value)
(Highcharts) Whether to hide data labels that are outside the plot area.
|
void |
setDefer(boolean value)
(Highcharts, Highstock, Gantt) Whether to defer displaying the data
labels until the initial series animation has finished.
|
void |
setEnabled(boolean value)
(Highcharts) Enable or disable the data labels.
|
void |
setFilter(PlotHistogramDataLabelsFilterOptions value)
(Highcharts) A declarative filter for which data labels to display.
|
void |
setFormat(String value)
(Highcharts) A format string for the data label.
|
void |
setFormatter(FormatterCallbackFunction<SeriesDataLabelsFormatterContextObject> value)
(Highcharts) Callback JavaScript function to format the data label.
|
void |
setInside(boolean value)
(Highcharts) For points with an extent, like columns or map areas,
whether to align the data label inside the box or to the actual value
point.
|
void |
setOverflow(PlotHistogramDataLabelsOptions.Overflow value)
(Highcharts) How to handle data labels that flow outside the plot area.
|
void |
setPadding(double value)
(Highcharts) When either the
borderWidth or the backgroundColor is
set, this is the padding within the box. |
void |
setRotation(double value)
(Highcharts) Text rotation in degrees.
|
void |
setShadow(boolean value)
(Highcharts) The shadow of the box.
|
void |
setShadow(ShadowOptionsObject value)
(Highcharts) The shadow of the box.
|
void |
setShape(String value)
(Highcharts) The name of a symbol to use for the border around the label.
|
void |
setStyle(CSSObject value)
(Highcharts) Styles for the label.
|
void |
setUseHTML(boolean value)
(Highcharts) Whether to use HTML to render the labels.
|
void |
setVerticalAlign(PlotHistogramDataLabelsOptions.VerticalAlign value)
(Highcharts) The vertical alignment of a data label.
|
void |
setX(double value)
(Highcharts) The x position offset of the label relative to the point in
pixels.
|
void |
setY(double value)
(Highcharts) The y position offset of the label relative to the point in
pixels.
|
void |
setZIndex(double value)
(Highcharts) The Z index of the data labels.
|
@Nullable PlotHistogramDataLabelsOptions.Align getAlign()
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
.void setAlign(PlotHistogramDataLabelsOptions.Align value)
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
.boolean getAllowOverlap()
void setAllowOverlap(boolean value)
@Nullable Unknown getBackgroundColor()
void setBackgroundColor(GradientColorObject value)
void setBackgroundColor(String value)
void setBackgroundColor(Any value)
@Nullable String getBorderColor()
undefined
.void setBorderColor(String value)
undefined
.double getBorderRadius()
void setBorderRadius(double value)
double getBorderWidth()
void setBorderWidth(double value)
@Nullable String getClassName()
void setClassName(String value)
@Nullable Unknown getColor()
undefined
.
For certain series types, like column or map, the data labels can be
drawn inside the points. In this case the data label will be drawn with
maximum contrast by default. Additionally, it will be given a
text-outline
style with the opposite color, to further increase the
contrast. This can be overridden by setting the text-outline
style to
none
in the dataLabels.style
option.void setColor(GradientColorObject value)
undefined
.
For certain series types, like column or map, the data labels can be
drawn inside the points. In this case the data label will be drawn with
maximum contrast by default. Additionally, it will be given a
text-outline
style with the opposite color, to further increase the
contrast. This can be overridden by setting the text-outline
style to
none
in the dataLabels.style
option.void setColor(String value)
undefined
.
For certain series types, like column or map, the data labels can be
drawn inside the points. In this case the data label will be drawn with
maximum contrast by default. Additionally, it will be given a
text-outline
style with the opposite color, to further increase the
contrast. This can be overridden by setting the text-outline
style to
none
in the dataLabels.style
option.void setColor(Any value)
undefined
.
For certain series types, like column or map, the data labels can be
drawn inside the points. In this case the data label will be drawn with
maximum contrast by default. Additionally, it will be given a
text-outline
style with the opposite color, to further increase the
contrast. This can be overridden by setting the text-outline
style to
none
in the dataLabels.style
option.boolean getCrop()
void setCrop(boolean value)
boolean getDefer()
void setDefer(boolean value)
boolean getEnabled()
void setEnabled(boolean value)
@Nullable PlotHistogramDataLabelsFilterOptions getFilter()
formatter
instead, and return undefined
to disable a single data
label.void setFilter(PlotHistogramDataLabelsFilterOptions value)
formatter
instead, and return undefined
to disable a single data
label.@Nullable String getFormat()
formatter
.void setFormat(String value)
formatter
.@Nullable FormatterCallbackFunction<SeriesDataLabelsFormatterContextObject> getFormatter()
format
is defined, the format takes precedence and the
formatter is ignored. Available data are:
(see online documentation for example)void setFormatter(FormatterCallbackFunction<SeriesDataLabelsFormatterContextObject> value)
format
is defined, the format takes precedence and the
formatter is ignored. Available data are:
(see online documentation for example)boolean getInside()
false
in most cases, true
in stacked columns.void setInside(boolean value)
false
in most cases, true
in stacked columns.@Nullable PlotHistogramDataLabelsOptions.Overflow getOverflow()
"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 "allow"
.void setOverflow(PlotHistogramDataLabelsOptions.Overflow value)
"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 "allow"
.double getPadding()
borderWidth
or the backgroundColor
is
set, this is the padding within the box.void setPadding(double value)
borderWidth
or the backgroundColor
is
set, this is the padding within the box.double getRotation()
void setRotation(double value)
@Nullable Unknown getShadow()
borderWidth
or
backgroundColor
. Since 2.3 the shadow can be an object configuration
containing color
, offsetX
, offsetY
, opacity
and width
.void setShadow(ShadowOptionsObject value)
borderWidth
or
backgroundColor
. Since 2.3 the shadow can be an object configuration
containing color
, offsetX
, offsetY
, opacity
and width
.void setShadow(boolean value)
borderWidth
or
backgroundColor
. Since 2.3 the shadow can be an object configuration
containing color
, offsetX
, offsetY
, opacity
and width
.@Nullable String getShape()
void setShape(String value)
@Nullable CSSObject getStyle()
color
setting is
"contrast"
, which is a pseudo color that Highcharts picks up and
applies the maximum contrast to the underlying point item, for example
the bar in a bar chart.
The textOutline
is a pseudo property that applies an outline of the
given width with the given color, which by default is the maximum
contrast to the text. So a bright text color will result in a black text
outline for maximum readability on a mixed background. In some cases,
especially with grayscale text, the text outline doesn't work well, in
which cases it can be disabled by setting it to "none"
. When useHTML
is true, the textOutline
will not be picked up. In this, case, the same
effect can be acheived through the text-shadow
CSS property.
For some series types, where each point has an extent, like for example
tree maps, the data label may overflow the point. There are two
strategies for handling overflow. By default, the text will wrap to
multiple lines. The other strategy is to set style.textOverflow
to
ellipsis
, which will keep the text on one line plus it will break
inside long words.void setStyle(CSSObject value)
color
setting is
"contrast"
, which is a pseudo color that Highcharts picks up and
applies the maximum contrast to the underlying point item, for example
the bar in a bar chart.
The textOutline
is a pseudo property that applies an outline of the
given width with the given color, which by default is the maximum
contrast to the text. So a bright text color will result in a black text
outline for maximum readability on a mixed background. In some cases,
especially with grayscale text, the text outline doesn't work well, in
which cases it can be disabled by setting it to "none"
. When useHTML
is true, the textOutline
will not be picked up. In this, case, the same
effect can be acheived through the text-shadow
CSS property.
For some series types, where each point has an extent, like for example
tree maps, the data label may overflow the point. There are two
strategies for handling overflow. By default, the text will wrap to
multiple lines. The other strategy is to set style.textOverflow
to
ellipsis
, which will keep the text on one line plus it will break
inside long words.boolean getUseHTML()
void setUseHTML(boolean value)
@Nullable PlotHistogramDataLabelsOptions.VerticalAlign getVerticalAlign()
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.void setVerticalAlign(PlotHistogramDataLabelsOptions.VerticalAlign value)
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.double getX()
void setX(double value)
double getY()
void setY(double value)
double getZIndex()
void setZIndex(double value)
Copyright © 2020. All rights reserved.