Chartjs-Why are more columns on one labels in Angular ChartJS?

1👍

https://stackblitz.com/edit/angular-zbiufy

You have two categories. So for every input u need to add two values. Then for two color, U can make fist item’s second value 0 and second item’s first value 0 then u can get what u want.

 this.barChartData = [
          {data: [this.values[0],0], label: this.keys[0]},
          {data: [0,this.values[1]], label: this.keys[1]}
        ];

Leave a comment