Title Configuration Options
There are some of the options are mentioned below:
- align: This option allows you to align the text in “start”, “center” or “end”. It is of String type & the default value is center.
- color: This option is used to set the color of the text. It is of Color type & the default value is Chart.defaults.color.
- display: This is used to control the visibility of the title on screen. It is of Boolean type & default value is false.
- fullSize: It helps to define the full width/height of the canvas box. It is of Boolean type & default value is true.
- position: It helps to define the position for the title of the Chart. It is of String type & the default value is top.
- font: It is used to set the font for the Chart. It is of Font type & the default value is bold.
- padding: It is used to implement the padding around the title, where only the top & bottom can be implemented. It is of padding type & the default value is 10.
- text: This is the actual text which will be displayed as a title on the screen. It is of string|string[] type & the default value is ‘ ‘.
Chart.js Title Configuration
In this article, we will learn the concept of Chart.Js Title Configuration by using the Chart.js CDN library, along with understanding their basic implementation through the illustrations.
In Chart.js, Title Configuration is mainly the config option to customize and manage the title of the chart. There are different types of configurations that are embedded here. The options.plugins.title is the global option that defines the chat title in Chart.defaults.plugins.title.