B
B
Bogdan2018-02-26 16:53:16
Vue.js
Bogdan, 2018-02-26 16:53:16

Vue-chart.js reactivity?

But don’t tell me if there are options, otherwise, as far as I understand, after changing one value in the array with data, you have to recreate the entire object, as I understand it, tracking is set to {deep: true}

methods: {
    onChangeChart( ) {
      // this.$set( this.chartData.datasets[ 0 ].data, 0, 55 );
        this.chartData.datasets[ 0 ].data.splice(0, 1, 55);
        this.chartData = Object.assign({}, this.chartData);
    },

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Koch, 2018-02-26
@amux

vue-chartjs.org/#/home?id=reactive-data

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question