Search results

TitleSettings API in JavaScript Stock Chart API control

The titleSettings class provides options to customize the title and subtitle displayed in the chart.

Properties

background

string

The background property sets the background color of the chart title and subtitle.

Defaults to ‘transparent’

border

titleBorderModel

The border property allows configuring the border settings for the chart title and subtitle.

color

string

The color property specifies the color of the text used for the chart title and subtitle.

Defaults to

fontFamily

string

The fontFamily property specifies the font family for the text used in the chart title and subtitle.

fontStyle

string

The fontStyle property specifies the style of the text used for the chart title and subtitle.

Defaults to ‘Normal’

fontWeight

string

The fontWeight property specifies the weight (thickness) of the text used for the chart title and subtitle.

Defaults to ‘500’

opacity

number

Specifies the opacity for the text.

Defaults to 1

position

TitlePosition

Defines the position for the chart title and subtitle. The available options are:

  • Top: Displays the title and subtitle at the top of the chart.
  • Left: Displays the title and subtitle at the left of the chart.
  • Bottom: Displays the title and subtitle at the bottom of the chart.
  • Right: Displays the title and subtitle at the right of the chart.
  • Custom: Displays the title and subtitle based on the specified x and y values.

Defaults to ‘Top’

size

string

Specifies the font size for the chart title and subtitle.

Defaults to ‘15px’

textAlignment

Alignment

The textAlignment property determines how the text is aligned within the specified area.

Defaults to ‘Center’

textOverflow

TextOverflow

The textOverflow property determines how the text in the chart title and subtitle behaves when it exceeds the available space.

Defaults to ‘Wrap’

x

number

Defines the X coordinate for the chart title and subtitle.

Defaults to 0

y

number

Defines the Y coordinate for the chart title and subtitle.

Defaults to 0