Chart.js Subtitle Plugin
Simple subtitle plugin for Chart.Js
Works with all four title positions and multi-line titles. See more information on standard title options
Install
npm install --save chart.js chartjs-subtitle
Options
The options for the subtitle are based on the options for the existing title
options: ... plugins: chartJsPluginSubtitle: /** * is the title shown * @member * @default false */ display: false /** * Font size * Expects either a string with `pt` or `px`, or a number of px * @member * @default 12 */ fontSize: 12 /** * Font family for the title text. * @member * @default "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif" */ fontFamily: "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif" /** * Font color * @member * @default '#888' */ fontColor: '#888' /** * Font style * @member * @enum 'normal' | 'bold' | 'italic' | 'italic bold' * @default 'normal' */ fontStyle: 'normal' /** * Padding between the title and the subtitle * @member * @default 4 */ paddingTop: 4 /** * Subtitle text to display * @member * @default '' */ text: '' ...
Examples
Building
npm installnpm run build
Built by Jered Masters, linkedin