Search
[JavaScript] datalabels are not displayed in chart.js
- M.R 
- Jan 3, 2024
- 1 min read
Phenomenon
I draw graphs using chart.js.
options: {
        plugins: {
          datalabels: {I wanted to display the label with above code, but it is not displayed
Cause and Solution
Add the following to the same level as 'options:'
plugins: [
    ChartDataLabels,
],![[JavaScript] Draw a stacked graph with chart.js](https://static.wixstatic.com/media/90b712_4ed572ee59e54fb0a45af4d3b16c022f~mv2.png/v1/fill/w_980,h_538,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/90b712_4ed572ee59e54fb0a45af4d3b16c022f~mv2.png)






Comments