Subtitle

Subtitle is a second title placed under the main title, by default. It has exactly the same configuration options with the main title.

Subtitle Configuration

Namespace: options.plugins.subtitle. The global defaults for subtitle are configured in Chart.defaults.plugins.subtitle.

Exactly the same configuration options with title are available for subtitle, the namespaces only differ.

Example Usage

The example below would enable a title of ‘Custom Chart Subtitle’ on the chart that is created.

  1. const chart = new Chart(ctx, {
  2. type: 'line',
  3. data: data,
  4. options: {
  5. plugins: {
  6. subtitle: {
  7. display: true,
  8. text: 'Custom Chart Subtitle'
  9. }
  10. }
  11. }
  12. });