public class Label extends AbstractConfigurationObject
Modifier and Type | Method and Description |
---|---|
HorizontalAlign |
getAlign() |
Number |
getRotation() |
String |
getText() |
TextAlign |
getTextAlign() |
Boolean |
getUseHTML() |
VerticalAlign |
getVerticalAlign() |
Number |
getX() |
Number |
getY() |
void |
setAlign(HorizontalAlign align)
Horizontal alignment of the label.
|
void |
setRotation(Number rotation)
Rotation of the text label in degrees.
|
void |
setText(String text)
The text itself.
|
void |
setTextAlign(TextAlign textAlign)
The text alignment for the label.
|
void |
setUseHTML(Boolean useHTML)
Whether to use HTML to render the labels.
|
void |
setVerticalAlign(VerticalAlign verticalAlign)
Vertical alignment of the label relative to the plot band.
|
void |
setX(Number x)
Horizontal position relative the alignment.
|
void |
setY(Number y)
Vertical position of the text baseline relative to the alignment.
|
public Label()
public Label(String text)
public HorizontalAlign getAlign()
setAlign(HorizontalAlign)
public void setAlign(HorizontalAlign align)
Defaults to: left
public Number getRotation()
setRotation(Number)
public void setRotation(Number rotation)
public String getText()
setText(String)
public void setText(String text)
public TextAlign getTextAlign()
setTextAlign(TextAlign)
public void setTextAlign(TextAlign textAlign)
align
determines
where the texts anchor point is placed within the plot band,
textAlign
determines how the text is aligned against its
anchor point. Possible values are "left", "center" and "right". Defaults
to the same as the align
option.public Boolean getUseHTML()
setUseHTML(Boolean)
public void setUseHTML(Boolean useHTML)
Whether to use HTML to render the labels.
Defaults to: false
public VerticalAlign getVerticalAlign()
setVerticalAlign(VerticalAlign)
public void setVerticalAlign(VerticalAlign verticalAlign)
Defaults to: top
public Number getX()
setX(Number)
public void setX(Number x)
public Number getY()
setY(Number)
public void setY(Number y)
Copyright © 2023. All rights reserved.