chartjs-plugin-datalabels icon indicating copy to clipboard operation
chartjs-plugin-datalabels copied to clipboard

Problem display datalables using Chart.js 4.4.0

Open 2uk3y opened this issue 2 years ago • 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?

2uk3y avatar Nov 09 '23 03:11 2uk3y

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

peteruithoven avatar Nov 13 '23 09:11 peteruithoven

@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

stockiNail avatar Dec 05 '23 12:12 stockiNail