0๐
โ
You are using V2 of the datalabels plugin with V2 of chart.js this does not work since it is for chart.js v3, you need to use V1 of the datalabels plugin to work with your version of chart.js
0๐
As reported in the question Adding Scatter Dots to Horizontal Stacked Bar Chart.js, you must use Datalabels version 1.
Both provided snippet and codepen are using Datalabels version 1.
I think you donโt register the plugin (see snippet code in the other question).
const ctx = document.getElementById("myChart");
Chart.plugins.register(ChartDataLabels); // --> I think this is missing
const myChart = new Chart(ctx, {
Source:stackexchange.com