0👍
It might be Vue reactivity problem. You need to update references to this.transactions
to make Vue reactive
updateChart(period) {
console.log('Chart updated for period: ' + period);
this.transactions.datasets.push({
label: 'Users',
data: [123, 19, 3, 5, 2, 3, 20, 33, 23, 12, 33, 10],
backgroundColor: 'rgba(66, 165, 245, 0.5)',
borderColor: '#2196F3',
borderWidth: 1
});
this.transactions = JSON.parse(JSON.stringify(this.transactions))
}
- [Vuejs]-Styling not being applied to SINGLE ELEMENT after exacting JQuery function on single element within a ,vue page
- [Vuejs]-Previous and current data in Vue life hooks
Source:stackexchange.com