I am creating the bar chart with below combination, all good only the issue is 'datalabels" shows up the calculated value as default after mouse over the original data comes up. any help would be great.
not sure where you got originalData from since its nowhere in the documentation. The error is correct, there is not property called originalData on the data object. You need to target the datasets property
I am creating the bar chart with below combination, all good only the issue is 'datalabels" shows up the calculated value as default after mouse over the original data comes up. any help would be great.
When I use the below code it's throws error originalData is not a property.
plugins: { display: true, datalabels: { display: true, formatter: (value, context) => { const data = context.chart.data; const datasetIndex = context.datasetIndex; const dataIndex = context.dataIndex; if (data.originalData[datasetIndex][dataIndex] === 0) { return ''; } return data.originalData[datasetIndex][dataIndex]; } }, stacked100: {enable: true} }