# 副标题

¥Subtitle

默认情况下,副标题是位于主标题下方的第二个标题。它具有与主 title 完全相同的配置选项。

¥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

命名空间:options.plugins.subtitle。字幕的全局默认值在 Chart.defaults.plugins.subtitle 中配置。

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

title 完全相同的配置选项可用于字幕,只是命名空间不同。

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

# 用法示例

¥Example Usage

下面的示例将在创建的图表上启用标题 'Custom Chart Subtitle'。

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

const chart = new Chart(ctx, {
    type: 'line',
    data: data,
    options: {
        plugins: {
            subtitle: {
                display: true,
                text: 'Custom Chart Subtitle'
            }
        }
    }
});