3👍
I had a similar problem. It was solved by replacing labels and data parts with
{{labels | tojson}}
{{values | tojson}}
if they are lists.
I found the answer here
- [Chartjs]-Using chart.js with importmaps in rail 7
- [Chartjs]-React chart : prevent chart's canvas scaling with height and width
Source:stackexchange.com