mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 09:50:21 +00:00
chore(examples): Update reactive prop examples
This commit is contained in:
@@ -4,17 +4,19 @@ import reactiveData from '../mixins/reactiveData'
|
||||
export default {
|
||||
extends: Bar,
|
||||
mixins: [reactiveData],
|
||||
data () {
|
||||
return {
|
||||
chartData: ''
|
||||
data: () => ({
|
||||
chartData: '',
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
},
|
||||
}),
|
||||
created () {
|
||||
this.fillData()
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.renderChart(this.chartData, {responsive: true, maintainAspectRatio: false})
|
||||
this.renderChart(this.chartData, this.options)
|
||||
|
||||
setInterval(() => {
|
||||
this.fillData()
|
||||
|
||||
@@ -4,8 +4,14 @@ import reactiveProp from '../mixins/reactiveProp'
|
||||
export default {
|
||||
extends: Bar,
|
||||
mixins: [reactiveProp],
|
||||
data: () => ({
|
||||
options: {
|
||||
responsive: true,
|
||||
maintainAspectRatio: false
|
||||
}
|
||||
}),
|
||||
|
||||
mounted () {
|
||||
this.renderChart(this.chartData, {responsive: true, maintainAspectRatio: false})
|
||||
this.renderChart(this.chartData, this.options)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user