[Chartjs]-ChartJs how can I move bar into new group?

1πŸ‘

βœ…

To move it over you need to tell chart.js the value should be mapped to the second label by placing it in the second place in the data array, this can be achieved by adding a null value in front of it. So your cash dataset will look like this:

{
  label: "Cash",
  type: "bar",
  stack: "Three",
  backgroundColor: "#65C2F8",
  data: [null, 4]
}

Leave a comment