0
You are using v2 syntax in v3, the internal plugins like the tooltip, title, legend and decimation have been moved from the options
namespace to the options.plugins
namespace.
So you need to nest the title options in a plugins object within the options object. Then it will work
- Chartjs-Legend position is not vertically in middle in Donut chart
- Chartjs-Charts.js line chart: Show the most recent date on x-axis when setting ticks.maxTicksLimit
0
For those like me, who are looking for a solution using vue-chartjs
V4.
To show the Title
you need to pass the plugin object, for example:
plugins: {
type: Array,
default: () => [Title]
}
and then pass into the chartOptions
props the title
configuration, for example:
chartOptions: {
responsive: true,
maintainAspectRatio: false,
plugins: {
title: {
display: true,
text: "Chart Title",
},
},
}
Source:stackexchange.com