title

Specifies the title for a value axis.

Type: Object

If you only wish to set the text for the axis title, assign the text to the title property directly. If you need to customize title options, set the text property and other properties of the title configuration object. For an overview of axis titles, refer to the Axis Titles topic.

If you need to set similar values for titles of all axes, use the commonAxisSettings | title configuration object. It exposes the properties that can be specified for titles of all axes at once. Note that the values specified for the value axis individually (in the valueAxis | title object) override the values that are specified for all axes (in the commonAxisSettings | title object).

To define a title for an individual value axis, use the properties listed in the valueAxis | title object. In addition, any property of the commonAxisSettings | title configuration object can be added to the individual definition of the value axis title. For example, even though a common margin is specified in the commonAxisSettings, an individual margin can be specified for each axis.

Show Example:
jQuery

In the example below, the value axis title text is assigned directly to the title field.


                                    

                                    

font

Specifies font options for an axis title.

Type: Object

Show Example:
jQuery

In this example, the value axis' title text is red, and its size is increased to 30 pixels.


                                    

                                    

margin

Specifies a margin for an axis title in pixels.

Type: Number
Default Value: 10

AxesTitleMargin ChartJS

text

Specifies the text for the value axis title.

Type: String
Default Value: undefined

If you do not wish to set the other properties of the title object, assign the title text to the title property directly.

Show Example:
jQuery

In the example below, the value axis title text is specified using the title option's text field.