[Chartjs]-Vue-chart.js / vuex: Chart not updating when vuex state changes

1👍

You must pass the data in the prop. I.e. fastest solution for you would be to have fillData() return the datacollection in the correct format.

E.g.

fillData(){
    return {
      datasets: [
        {
          data: [
            this.boardColumnData[0].total.$numberDecimal,
            this.boardColumnData[1].total.$numberDecimal,
            this.boardColumnData[2].total.$numberDecimal,
            this.boardColumnData[3].total.$numberDecimal,
          ],
          backgroundColor: ["#83dd1a", "#d5d814", "#fdab2f", "#1ad4dd"],
          borderColor: ["#83dd1a", "#d5d814", "#fdab2f", "#1ad4dd"],
        },
      ];
    }
}

You need to do the same for the options, but pass them in a new options=yourOptions() prop.

This drove me absolutely bonkers. I hope this still helps you (or someone else).

Leave a comment