How to create bar chart with group and sam color for each group using chart.js?

๐Ÿ‘:0

Done

datasets: [{
        label: '',
        data: [...Array(160)].map(e => ~~(Math.random() * 160)),
        backgroundColor: ['#E07A5F','#81B29A','#3D405B'],
        borderWidth: 1
      },
      {
        label: '',
        fontSize: 40,
        data: [...Array(160)].map(e => ~~(Math.random() * 160)),
        backgroundColor: ['#E07A5F', '#81B29A', '#3D405B'],
        borderWidth: 1
      },
      {
        label: '',
        fontSize: 40,
        data: [...Array(160)].map(e => ~~(Math.random() * 160)),
        backgroundColor: ['#E07A5F', '#81B29A', '#3D405B'],
        borderWidth: 1
      },
      {
          label: '',
          fontSize: 40,
          data: [...Array(160)].map(e => ~~(Math.random() * 160)),
          backgroundColor: ['#E07A5F', '#81B29A', '#3D405B'],
          borderWidth: 1
        },
        {
          label: '',
          fontSize: 40,
          data: [...Array(160)].map(e => ~~(Math.random() * 160)),
          backgroundColor: ['#E07A5F', '#81B29A', '#3D405B'],
          borderWidth: 1
        }

      ]

Leave a comment