Chartjs-Chart js label issue in react js

0👍

Your issue is related to way you are setting your data inside dataset.

I did a live demo for you solving the issue:
https://codesandbox.io/s/boring-banach-lvffs?file=/src/App.js

Data is an array, each position of that array means one column, so you should do like:

datasets: [
        {
          label: "Lonely",
           .....
          data: [30]
        },
        {
          label: "Relationship",
           .....
          data: [0,45]
        },

Leave a comment