Class Labels
- All Implemented Interfaces:
Serializable
The axis labels show the number or category for each tick. X and Y axis labels are by default disabled in Highmaps, but the functionality is inherited from Highcharts and used on colorAxis, and can be enabled on X and Y axes too.
For more live examples on label options, see yAxis.labels in the Highcharts API.
- Version:
- $Id: $Id
- Author:
- Vaadin
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAlign()Getter for the fieldalign.Getter for the fieldenabled.Getter for the fieldformat.getFormatter.Getter for the fieldoverflow.Getter for the fieldrotation.Getter for the fieldstaggerLines.getStep()Getter for the fieldstep.getStyle()Getter for the fieldstyle.Getter for the fielduseHTML.getX()Getter for the fieldx.getY()Getter for the fieldy.Getter for the fieldzIndex.voidsetAlign(HorizontalAlign align) What part of the string the given position is anchored to.voidsetEnabled(Boolean enabled) Enable or disable the axis labels.voidA format string for the axis label.voidsetFormatter(String _fn_formatter) setFormatter.voidsetOverflow(String overflow) How to handle overflowing labels on horizontal axis.voidsetRotation(Number rotation) Setter for the fieldrotation.voidsetRotation(String rotation) Setter for the fieldrotation.voidsetRotationPerpendicular.voidsetStaggerLines(Number staggerLines) Horizontal axes only.voidTo show only every n'th label on the axis, set the step to n.voidCSS styles for the label.voidsetUseHTML(Boolean useHTML) Whether to use HTML to render the labels.voidThe x position offset of the label relative to the tick position on the axis.voidThe y position offset of the label relative to the tick position on the axis.voidThe Z index for the axis labels.
-
Constructor Details
-
Labels
public Labels()Constructor for Labels.
-
Labels
Constructor for Labels.
- Parameters:
enabled- aBooleanobject.
-
-
Method Details
-
getAlign
Getter for the field
align.- Returns:
- a
HorizontalAlignobject. - See Also:
-
setAlign
What part of the string the given position is anchored to. Can be one of"left","center"or"right".Defaults to: right
- Parameters:
align- aHorizontalAlignobject.
-
getEnabled
Getter for the field
enabled.- Returns:
- a
Booleanobject. - See Also:
-
setEnabled
Enable or disable the axis labels.Defaults to: false
- Parameters:
enabled- aBooleanobject.
-
getFormat
Getter for the field
format.- Returns:
- a
Stringobject. - See Also:
-
setFormat
A format string for the axis label.Defaults to: {value}
- Parameters:
format- aStringobject.
-
getFormatter
getFormatter.
- Returns:
- a
Stringobject.
-
setFormatter
setFormatter.
- Parameters:
_fn_formatter- aStringobject.
-
getStaggerLines
Getter for the field
staggerLines.- Returns:
- a
Numberobject. - See Also:
-
setStaggerLines
Horizontal axes only. The number of lines to spread the labels over to make room or tighter labels. .- Parameters:
staggerLines- aNumberobject.
-
getStep
Getter for the field
step.- Returns:
- a
Numberobject. - 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.- Parameters:
step- aNumberobject.
-
getStyle
Getter for the field
style.- Returns:
- a
Styleobject. - See Also:
-
setStyle
CSS styles for the label.Defaults to: {"color":"#6D869F","fontWeight":"bold"}
- Parameters:
style- aStyleobject.
-
getUseHTML
Getter for the field
useHTML.- Returns:
- a
Booleanobject. - See Also:
-
setUseHTML
Whether to use HTML to render the labels.Defaults to: false
- Parameters:
useHTML- aBooleanobject.
-
getX
Getter for the field
x.- Returns:
- a
Numberobject. - 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.- Parameters:
x- aNumberobject.
-
getY
Getter for the field
y.- Returns:
- a
Numberobject. - See Also:
-
setY
The y position offset of the label relative to the tick position on the axis.Defaults to: 3
- Parameters:
y- aNumberobject.
-
getZIndex
Getter for the field
zIndex.- Returns:
- a
Numberobject. - See Also:
-
setZIndex
The Z index for the axis labels.Defaults to: 7
- Parameters:
zIndex- aNumberobject.
-
getOverflow
Getter for the field
overflow.- Returns:
- a
Stringobject. - See Also:
-
setOverflow
How to handle overflowing labels on horizontal axis. Can be undefined or "justify". If "justify", labels will not render outside the plot area. If there is room to move it, it will be aligned to the edge, else it will be removed.Defaults to: justify
- Parameters:
overflow- aStringobject.
-
getRotation
Getter for the field
rotation.- Returns:
- a
Stringobject.
-
setRotation
Setter for the field
rotation.- Parameters:
rotation- aStringobject.
-
setRotation
Setter for the field
rotation.- Parameters:
rotation- aNumberobject.
-
setRotationPerpendicular
public void setRotationPerpendicular()setRotationPerpendicular.
-