Chartjs-Vue js bar-chart gradient color not showing

0👍

Well you can not reference data properties inside data properties in vue.js

data: () => ({
 data1: '1',
 data2: this.data1
})

This will not work tho.

You can put your datacollection directly inside the renderChart() method and then add the gradient. Or try to use computed properties

Leave a comment