Add chartJS to Quasar
-
npm install vue-chartjs
1.Chart component (.js not .vue)
2.Parent component
3.Result
-
Nice work! Thanks for sharing this!
-
this slightly changed with the new VueJS Version :
commitChart.js :
import { Bar } from 'vue-chartjs' export default { extends: Bar, props: ['data'], mounted: function () { this.renderChart(this.data, this.options) }, data () { return { options: { title: { display: true, text: 'some title' } } } } }
THe rest remains the same.
-
@rstoenescu perfect!
-
Would be cool have this one ‘setup’ as well:
https://github.com/antvis/f2
see also:
https://medium.com/@SimaZwx/https-medium-com-simazwx-introducing-f2-c44fb4e74c2d -