chartjs/chartjs-plugin-datalabels

Problem display datalables using Chart.js 4.4.0

2uk3y opened this issue · 2 comments

I have problem to display datalables on top of each bar.
using Chart.js 4.4.0 and chartjs-plugin-datalabels 2.2.0.

here is the code that i try that not working.

https://codepen.io/2uk3y/pen/rNPyPgW

any mistake?

Discussions > Q&A might be a better place for this one?

@2uk3y maybe I'm wrong but you haven't registered the plugin.

Chart.register(ChartDataLabels);

See doc: https://chartjs-plugin-datalabels.netlify.app/guide/getting-started.html#registration

Adding it, your codepen sounds working.

Created a copy of yours here: https://codepen.io/stockinail/pen/oNmJeyp