Anyone know why subtitles will not render in react-chartjs-2?
Everything else seems to work fine. The title renders and I can get data to display on the chart. But adding a subtitle does nothing.
Here is my chart options object:
const chartOptions = {
plugins: {
legend: {
display: false,
},
title: {
display: true,
text: 'Sample Title',
},
subtitle: {
display: true,
text: 'Sample Subtitle'
}
}
}
I am using the following versions: react-chartjs-2 version 4.0.0 and chart.js version 3.7.0
I am wondering if this a version issue between chart.js and react-chartjs-2? I know there used to be version issues in the past. However, I've looked at the docs and it says react-chartjs-2 should work with chart.js version 3. So I am wondering if there could still be a version issue with certain features?
I am totally stumped on this problem. Looked all over google and cannot find any solution. Thanks in advance for any help/suggestions.