Class DataLabelsRange
java.lang.Object
com.vaadin.flow.component.charts.model.AbstractConfigurationObject
com.vaadin.flow.component.charts.model.AbstractDataLabels
com.vaadin.flow.component.charts.model.DataLabelsRange
- All Implemented Interfaces:
Serializable
Extended data labels for range series types. Range series data labels have no
x
and y
options. Instead, they have
xLow
, xHigh
, yLow
and
yHigh
options to allow the higher and lower data label sets
individually.- See Also:
-
Field Summary
Fields inherited from class com.vaadin.flow.component.charts.model.AbstractDataLabels
OVERFLOW_JUSTIFY, OVERFLOW_NONE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
getColor()
getCrop()
getDefer()
getShape()
getStyle()
getXHigh()
getXLow()
getYHigh()
getYLow()
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
setBackgroundColor
(Color backgroundColor) The background color or gradient for the data label.void
setBorderColor
(Color borderColor) The border color for the data label.void
setBorderRadius
(Number borderRadius) The border radius in pixels for the data label.void
setBorderWidth
(Number borderWidth) The border width in pixels for the data label.void
setClassName
(String className) A class name for the data label.void
The text color for the data labels.void
Whether to hide data labels that are outside the plot area.void
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
A format string for the data label.void
setFormatter
(String _fn_formatter) Callback JavaScript function to format the data label.void
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 theborderWidth
or thebackgroundColor
is set, this is the padding within the box.void
setRotation
(Number rotation) Text rotation in degrees.void
The shadow of the box.void
The name of a symbol to use for the border around the label.void
Styles for 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
X offset of the higher data labels relative to the point value.void
X offset of the lower data labels relative to the point value.void
Y offset of the higher data labels relative to the point value.void
Y offset of the lower data labels relative to the point value.void
The Z index of the data labels.
-
Constructor Details
-
DataLabelsRange
public DataLabelsRange() -
DataLabelsRange
-
-
Method Details
-
getAlign
- See Also:
-
setAlign
The alignment of the data label compared to the point. Ifright
, 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
-
getAllowOverlap
- See Also:
-
setAllowOverlap
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
-
getBackgroundColor
- Specified by:
getBackgroundColor
in classAbstractDataLabels
- See Also:
-
setBackgroundColor
The background color or gradient for the data label. Defaults toundefined
.- Specified by:
setBackgroundColor
in classAbstractDataLabels
-
getBorderColor
- Specified by:
getBorderColor
in classAbstractDataLabels
- See Also:
-
setBorderColor
The border color for the data label. Defaults toundefined
.- Specified by:
setBorderColor
in classAbstractDataLabels
-
getBorderRadius
- Specified by:
getBorderRadius
in classAbstractDataLabels
- See Also:
-
setBorderRadius
The border radius in pixels for the data label.Defaults to: 0
- Specified by:
setBorderRadius
in classAbstractDataLabels
-
getBorderWidth
- Specified by:
getBorderWidth
in classAbstractDataLabels
- See Also:
-
setBorderWidth
The border width in pixels for the data label.Defaults to: 0
- Specified by:
setBorderWidth
in classAbstractDataLabels
-
getClassName
- Specified by:
getClassName
in classAbstractDataLabels
- See Also:
-
setClassName
A class name for the data label. Particularly in styled mode, this can be used to give each series' or point's data label unique styling. In addition to this option, a default color class name is added so that we can give the labels a contrast text shadow.- Specified by:
setClassName
in classAbstractDataLabels
-
getColor
- Specified by:
getColor
in classAbstractDataLabels
- See Also:
-
setColor
The text color for the data labels. Defaults tonull
.- Specified by:
setColor
in classAbstractDataLabels
-
getCrop
- Specified by:
getCrop
in classAbstractDataLabels
- See Also:
-
setCrop
Whether to hide data labels that are outside the plot area. By default, the data label is moved inside the plot area according to the overflow option.Defaults to: true
- Specified by:
setCrop
in classAbstractDataLabels
-
getDefer
- Specified by:
getDefer
in classAbstractDataLabels
- See Also:
-
setDefer
Whether to defer displaying the data labels until the initial series animation has finished.Defaults to: true
- Specified by:
setDefer
in classAbstractDataLabels
-
getEnabled
- Specified by:
getEnabled
in classAbstractDataLabels
- See Also:
-
setEnabled
Enable or disable the data labels.Defaults to: false
- Specified by:
setEnabled
in classAbstractDataLabels
-
getFormat
- Specified by:
getFormat
in classAbstractDataLabels
- See Also:
-
setFormat
A format string for the data label. Available variables are the same as forformatter
.Defaults to: {y}
- Specified by:
setFormat
in classAbstractDataLabels
-
getFormatter
- Specified by:
getFormatter
in classAbstractDataLabels
- See Also:
-
setFormatter
Description copied from class:AbstractDataLabels
Callback JavaScript function to format the data label. Note that if aformat
is defined, the format takes precedence and the formatter is ignored.- Specified by:
setFormatter
in classAbstractDataLabels
-
getInside
- Specified by:
getInside
in classAbstractDataLabels
- See Also:
-
setInside
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.- Specified by:
setInside
in classAbstractDataLabels
-
getOverflow
- Specified by:
getOverflow
in classAbstractDataLabels
- See Also:
-
setOverflow
How to handle data labels that flow outside the plot area. The default isjustify
, 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"
.Defaults to: justify
- Specified by:
setOverflow
in classAbstractDataLabels
-
getPadding
- Specified by:
getPadding
in classAbstractDataLabels
- See Also:
-
setPadding
When either theborderWidth
or thebackgroundColor
is set, this is the padding within the box.Defaults to: 5
- Specified by:
setPadding
in classAbstractDataLabels
-
getRotation
- Specified by:
getRotation
in classAbstractDataLabels
- See Also:
-
setRotation
Text rotation in degrees. Note that due to a more complex structure, backgrounds, borders and padding will be lost on a rotated data label.Defaults to: 0
- Specified by:
setRotation
in classAbstractDataLabels
-
getShadow
- Specified by:
getShadow
in classAbstractDataLabels
- See Also:
-
setShadow
The shadow of the box. Works best withborderWidth
orbackgroundColor
. Since 2.3 the shadow can be an object configuration containingcolor
,offsetX
,offsetY
,opacity
andwidth
.Defaults to: false
- Specified by:
setShadow
in classAbstractDataLabels
-
getShape
- Specified by:
getShape
in classAbstractDataLabels
- See Also:
-
setShape
The name of a symbol to use for the border around the label. Symbols are predefined functions on the Renderer object.Defaults to: square
- Specified by:
setShape
in classAbstractDataLabels
-
getStyle
- Specified by:
getStyle
in classAbstractDataLabels
- See Also:
-
setStyle
Styles for the label. The defaultcolor
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. ThetextOutline
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"
.Defaults to: {"color": "contrast", "fontSize": "11px", "fontWeight": "bold", "textOutline": "1px contrast" }
- Specified by:
setStyle
in classAbstractDataLabels
-
getUseHTML
- Specified by:
getUseHTML
in classAbstractDataLabels
- See Also:
-
setUseHTML
Whether to use HTML to render the labels.Defaults to: false
- Specified by:
setUseHTML
in classAbstractDataLabels
-
getVerticalAlign
- Specified by:
getVerticalAlign
in classAbstractDataLabels
- See Also:
-
setVerticalAlign
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.- Specified by:
setVerticalAlign
in classAbstractDataLabels
-
getXHigh
- See Also:
-
setXHigh
X offset of the higher data labels relative to the point value.Defaults to: 0
-
getXLow
- See Also:
-
setXLow
X offset of the lower data labels relative to the point value.Defaults to: 0
-
getYHigh
- See Also:
-
setYHigh
Y offset of the higher data labels relative to the point value.Defaults to: -6
-
getYLow
- See Also:
-
setYLow
Y offset of the lower data labels relative to the point value.Defaults to: 16
-
getZIndex
- Specified by:
getZIndex
in classAbstractDataLabels
- See Also:
-
setZIndex
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.Defaults to: 6
- Specified by:
setZIndex
in classAbstractDataLabels
-