Class Title
- java.lang.Object
-
- com.vaadin.flow.component.charts.model.AbstractConfigurationObject
-
- com.vaadin.flow.component.charts.model.Title
-
- All Implemented Interfaces:
Serializable
public class Title extends AbstractConfigurationObject
The chart's main title.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HorizontalAligngetAlign()BooleangetFloating()NumbergetMargin()StylegetStyle()StringgetText()BooleangetUseHTML()VerticalAligngetVerticalAlign()NumbergetWidthAdjust()NumbergetX()NumbergetY()voidsetAlign(HorizontalAlign align)The horizontal alignment of the title.voidsetFloating(Boolean floating)When the title is floating, the plot area will not move to make space for it.voidsetMargin(Number margin)The margin between the title and the plot area, or if a subtitle is present, the margin between the subtitle and the plot area.voidsetStyle(Style style)CSS styles for the title.voidsetText(String text)The title of the chart.voidsetUseHTML(Boolean useHTML)Whether to use HTML to render the text.voidsetVerticalAlign(VerticalAlign verticalAlign)The vertical alignment of the title.voidsetWidthAdjust(Number widthAdjust)Adjustment made to the title width, normally to reserve space for the exporting burger menu.voidsetX(Number x)The x position of the title relative to the alignment within chart.spacingLeft and chart.spacingRight.voidsetY(Number y)The y position of the title relative to the alignment within chart.spacingTop and chart.spacingBottom.
-
-
-
Constructor Detail
-
Title
public Title()
-
Title
public Title(String text)
-
-
Method Detail
-
getAlign
public HorizontalAlign getAlign()
- See Also:
setAlign(HorizontalAlign)
-
setAlign
public void setAlign(HorizontalAlign align)
The horizontal alignment of the title. Can be one of "left", "center" and "right".Defaults to: center
-
getFloating
public Boolean getFloating()
- See Also:
setFloating(Boolean)
-
setFloating
public void setFloating(Boolean floating)
When the title is floating, the plot area will not move to make space for it.Defaults to: false
-
getMargin
public Number getMargin()
- See Also:
setMargin(Number)
-
setMargin
public void setMargin(Number margin)
The margin between the title and the plot area, or if a subtitle is present, the margin between the subtitle and the plot area.Defaults to: 15
-
getStyle
public Style getStyle()
- See Also:
setStyle(Style)
-
setStyle
public void setStyle(Style style)
CSS styles for the title. Use this for font styling, but use
align,xandyfor text alignment.In styled mode, the title style is given in the
.highcharts-titleclass.Defaults to: { "color": "#333333", "fontSize": "18px" }
-
getText
public String getText()
- See Also:
setText(String)
-
setText
public void setText(String text)
The title of the chart. To disable the title, set thetexttonull.Defaults to: Chart title
-
getUseHTML
public Boolean getUseHTML()
- See Also:
setUseHTML(Boolean)
-
setUseHTML
public void setUseHTML(Boolean useHTML)
Whether to use HTML to render the text.Defaults to: false
-
getVerticalAlign
public VerticalAlign getVerticalAlign()
- See Also:
setVerticalAlign(VerticalAlign)
-
setVerticalAlign
public void setVerticalAlign(VerticalAlign verticalAlign)
The vertical alignment of the title. Can be one of"top","middle"and"bottom". When a value is given, the title behaves as if floating weretrue.
-
getWidthAdjust
public Number getWidthAdjust()
- See Also:
setWidthAdjust(Number)
-
setWidthAdjust
public void setWidthAdjust(Number widthAdjust)
Adjustment made to the title width, normally to reserve space for the exporting burger menu.Defaults to: -44
-
getX
public Number getX()
- See Also:
setX(Number)
-
setX
public void setX(Number x)
The x position of the title relative to the alignment within chart.spacingLeft and chart.spacingRight.Defaults to: 0
-
getY
public Number getY()
- See Also:
setY(Number)
-
setY
public void setY(Number y)
The y position of the title relative to the alignment within chart.spacingTop and chart.spacingBottom. By default it depends on the font size.
-
-