com.vaadin.flow.component.charts.model.
Class Labels
All Implemented Interfaces:
See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlign()
Number[]
getStep()
getStyle()
getX()
getY()
void
setAlign
(HorizontalAlign align) What part of the string the given position is anchored to.
void
setAutoRotation
(Number[] autoRotation) For horizontal axes, the allowed degrees of label rotation to prevent overlapping labels.
void
setAutoRotationLimit
(Number autoRotationLimit) When each category width is more than this many pixels, we don't apply auto rotation.
void
setDistance
(Number distance) Angular gauges and solid gauges only.
void
setEnabled
(Boolean enabled) Enable or disable the axis labels.
void
A format string for the axis label.
void
setFormatter
(String _fn_formatter) void
setPadding
(Number padding) The pixel padding for axis labels, to ensure white space between them.
void
setReserveSpace
(Boolean reserveSpace) Whether to reserve space for the labels.
void
setRotation
(Number rotation) void
setRotation
(String rotation) void
void
setStaggerLines
(Number staggerLines) Horizontal axes only.
void
To show only every n'th label on the axis, set the step to n.
void
CSS styles for the label.
void
setUseHTML
(Boolean useHTML) Whether to use HTML to render the labels.
void
The x position offset of the label relative to the tick position on the axis.
void
The y position offset of the label relative to the tick position on the axis.
void
The Z index for the axis labels.
-
Constructor Details
-
Labels
public Labels() -
Labels
-
-
Method Details
-
getAlign
See Also:
-
setAlign
What part of the string the given position is anchored to. Can be one of
"left"
,"center"
or"right"
. The exact position also depends on thelabels.x
setting. Angular gauges and solid gauges defaults tocenter
.Defaults to: right
-
getAutoRotation
See Also:
-
setAutoRotation
For horizontal axes, the allowed degrees of label rotation to prevent overlapping labels. If there is enough space, labels are not rotated. As the chart gets narrower, it will start rotating the labels -45 degrees, then remove every second label and try again with rotations 0 and -45 etc. Set it to
false
to disable rotation, which will cause the labels to word-wrap if possible.Defaults to: [-45]
-
getAutoRotationLimit
See Also:
-
setAutoRotationLimit
When each category width is more than this many pixels, we don't apply auto rotation. Instead, we lay out the axis label with word wrap. A lower limit makes sense when the label contains multiple short words that don't extend the available horizontal space for each label.
Defaults to: 80
-
getDistance
See Also:
-
setDistance
Angular gauges and solid gauges only. The label's pixel distance from the perimeter of the plot area.
Defaults to: -25
-
getEnabled
See Also:
-
setEnabled
Enable or disable the axis labels.
Defaults to: true
-
getFormat
See Also:
-
setFormat
A format string for the axis label.
Defaults to: {value}
-
getFormatter
-
setFormatter
-
getPadding
See Also:
-
setPadding
The pixel padding for axis labels, to ensure white space between them.
Defaults to: 5
-
getReserveSpace
See Also:
-
setReserveSpace
Whether to reserve space for the labels. This can be turned off when for example the labels are rendered inside the plot area instead of outside.
Defaults to: true
-
getStaggerLines
See Also:
-
setStaggerLines
Horizontal axes only. The number of lines to spread the labels over to make room or tighter labels.
-
getStep
See Also:
-
setStep
To show only every n'th label on the axis, set the step to n. Setting the step to 2 shows every other label.
By default, the step is calculated automatically to avoid overlap. To prevent this, set it to 1. This usually only happens on a category axis, and is often a sign that you have chosen the wrong axis type. Read more at Axis docs => What axis should I use?
-
getStyle
See Also:
-
setStyle
CSS styles for the label. Use
whiteSpace: 'nowrap'
to prevent wrapping of category labels. UsetextOverflow: 'none'
to prevent ellipsis (dots).In styled mode, the labels are styled with the
.highcharts-axis-labels
class.Defaults to: { "color": "#666666", "cursor": "default", "fontSize": "11px" }
-
getUseHTML
See Also:
-
setUseHTML
Whether to use HTML to render the labels.
Defaults to: false
-
getX
See Also:
-
setX
The x position offset of the label relative to the tick position on the axis. Defaults to -15 for left axis, 15 for right axis.
-
getY
See Also:
-
setY
The y position offset of the label relative to the tick position on the axis.
Defaults to: 3
-
getZIndex
See Also:
-
setZIndex
The Z index for the axis labels.
Defaults to: 7
-
getRotation
-
setRotation
-
setRotation
-
setRotationPerpendicular
public void setRotationPerpendicular()
-