Closed martinjankov closed 2 years ago
@martinjankov if I'm not wrong, you are using Datalabels version 0.4.0.
For Chartjs 3.x, you need Datalabels 2.0.
Furthermore, please have a look to the plugin registration: https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#registration
@martinjankov I have tested with your sample:
plugins: [ChartDataLabels],
in chart configuration, after type: 'pie'
Result:
Hey! Shoutout to this fix! The syntax I'm finding everywhere, including the datalabels home page, Stack Overflow, ChatGpt etc is showing wrong or oudated syntax that is orthogonal to this. (Results in no labels, and no errors to explain why). stockiNail's syntax works.
https://jsfiddle.net/th4z9cfL/