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
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlign()getColor()getCrop()getDefer()getShape()getStyle()getXHigh()getXLow()getYHigh()getYLow()voidsetAlign(HorizontalAlign align) The alignment of the data label compared to the point.voidsetAllowOverlap(Boolean allowOverlap) Whether to allow data labels to overlap.voidsetBackgroundColor(Color backgroundColor) The background color or gradient for the data label.voidsetBorderColor(Color borderColor) The border color for the data label.voidsetBorderRadius(Number borderRadius) The border radius in pixels for the data label.voidsetBorderWidth(Number borderWidth) The border width in pixels for the data label.voidsetClassName(String className) A class name for the data label.voidThe text color for the data labels.voidWhether to hide data labels that are outside the plot area.voidWhether to defer displaying the data labels until the initial series animation has finished.voidsetEnabled(Boolean enabled) Enable or disable the data labels.voidA format string for the data label.voidsetFormatter(String _fn_formatter) Callback JavaScript function to format the data label.voidFor points with an extent, like columns, whether to align the data label inside the box or to the actual value point.voidsetOverflow(String overflow) How to handle data labels that flow outside the plot area.voidsetPadding(Number padding) When either theborderWidthor thebackgroundColoris set, this is the padding within the box.voidsetRotation(Number rotation) Text rotation in degrees.voidThe shadow of the box.voidThe name of a symbol to use for the border around the label.voidStyles for the label.voidsetUseHTML(Boolean useHTML) Whether to use HTML to render the labels.voidsetVerticalAlign(VerticalAlign verticalAlign) The vertical alignment of a data label.voidX offset of the higher data labels relative to the point value.voidX offset of the lower data labels relative to the point value.voidY offset of the higher data labels relative to the point value.voidY offset of the lower data labels relative to the point value.voidThe 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:
getBackgroundColorin classAbstractDataLabels- See Also:
-
setBackgroundColor
The background color or gradient for the data label. Defaults toundefined.- Specified by:
setBackgroundColorin classAbstractDataLabels
-
getBorderColor
- Specified by:
getBorderColorin classAbstractDataLabels- See Also:
-
setBorderColor
The border color for the data label. Defaults toundefined.- Specified by:
setBorderColorin classAbstractDataLabels
-
getBorderRadius
- Specified by:
getBorderRadiusin classAbstractDataLabels- See Also:
-
setBorderRadius
The border radius in pixels for the data label.Defaults to: 0
- Specified by:
setBorderRadiusin classAbstractDataLabels
-
getBorderWidth
- Specified by:
getBorderWidthin classAbstractDataLabels- See Also:
-
setBorderWidth
The border width in pixels for the data label.Defaults to: 0
- Specified by:
setBorderWidthin classAbstractDataLabels
-
getClassName
- Specified by:
getClassNamein 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:
setClassNamein classAbstractDataLabels
-
getColor
- Specified by:
getColorin classAbstractDataLabels- See Also:
-
setColor
The text color for the data labels. Defaults tonull.- Specified by:
setColorin classAbstractDataLabels
-
getCrop
- Specified by:
getCropin 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:
setCropin classAbstractDataLabels
-
getDefer
- Specified by:
getDeferin classAbstractDataLabels- See Also:
-
setDefer
Whether to defer displaying the data labels until the initial series animation has finished.Defaults to: true
- Specified by:
setDeferin classAbstractDataLabels
-
getEnabled
- Specified by:
getEnabledin classAbstractDataLabels- See Also:
-
setEnabled
Enable or disable the data labels.Defaults to: false
- Specified by:
setEnabledin classAbstractDataLabels
-
getFormat
- Specified by:
getFormatin classAbstractDataLabels- See Also:
-
setFormat
A format string for the data label. Available variables are the same as forformatter.Defaults to: {y}
- Specified by:
setFormatin classAbstractDataLabels
-
getFormatter
- Specified by:
getFormatterin classAbstractDataLabels- See Also:
-
setFormatter
Description copied from class:AbstractDataLabelsCallback JavaScript function to format the data label. Note that if aformatis defined, the format takes precedence and the formatter is ignored.- Specified by:
setFormatterin classAbstractDataLabels
-
getInside
- Specified by:
getInsidein 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 tofalsein most cases,truein stacked columns.- Specified by:
setInsidein classAbstractDataLabels
-
getOverflow
- Specified by:
getOverflowin 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, setcroptofalseandoverflowto"none".Defaults to: justify
- Specified by:
setOverflowin classAbstractDataLabels
-
getPadding
- Specified by:
getPaddingin classAbstractDataLabels- See Also:
-
setPadding
When either theborderWidthor thebackgroundColoris set, this is the padding within the box.Defaults to: 5
- Specified by:
setPaddingin classAbstractDataLabels
-
getRotation
- Specified by:
getRotationin 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:
setRotationin classAbstractDataLabels
-
getShadow
- Specified by:
getShadowin classAbstractDataLabels- See Also:
-
setShadow
The shadow of the box. Works best withborderWidthorbackgroundColor. Since 2.3 the shadow can be an object configuration containingcolor,offsetX,offsetY,opacityandwidth.Defaults to: false
- Specified by:
setShadowin classAbstractDataLabels
-
getShape
- Specified by:
getShapein 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:
setShapein classAbstractDataLabels
-
getStyle
- Specified by:
getStylein classAbstractDataLabels- See Also:
-
setStyle
Styles for the label. The defaultcolorsetting 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. ThetextOutlineis 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:
setStylein classAbstractDataLabels
-
getUseHTML
- Specified by:
getUseHTMLin classAbstractDataLabels- See Also:
-
setUseHTML
Whether to use HTML to render the labels.Defaults to: false
- Specified by:
setUseHTMLin classAbstractDataLabels
-
getVerticalAlign
- Specified by:
getVerticalAlignin classAbstractDataLabels- See Also:
-
setVerticalAlign
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.- Specified by:
setVerticalAlignin 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:
getZIndexin 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:
setZIndexin classAbstractDataLabels
-