subtitle

Configuration Structure

subtitle: {
text: string,
align: 'left' | 'center' | 'right',
margin: number,
offsetX: number,
offsetY: number,
floating: boolean,
style: { ... },
fontSize: string,
fontFamily: string,
fontWeight: string | number,
color: string,
}

text

Default: undefined

Text to display as a subtitle of chart

align

Default: 'left'

Alignment of subtitle relative to chart area.
Possible Options

  • left
  • center
  • right

margin

Default: 5

Vertical spacing around the subtitle text

offsetX

Default: 0

Sets the left offset for subtitle text

offsetY

Default: 30

Sets the top offset for subtitle text

floating

Default: false

The floating option will take out the subtitle text from the chart area and make it float on top of the chart.

style

fontSize

subtitle.style.fontSize
Default: '12px'

Font Size of the subtitle text

fontWeight

subtitle.style.fontWeight
Default: 400

Font Weight of the subtitle text

fontFamily

subtitle.style.fontFamily
Default: undefined

Font Family of the subtitle text

color

subtitle.style.color
Default: undefined

Fore color of the subtitle text