diff --git a/src/examples/ReactiveExample.js b/src/examples/ReactiveExample.js index 0e630947..ac6320f4 100644 --- a/src/examples/ReactiveExample.js +++ b/src/examples/ReactiveExample.js @@ -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() diff --git a/src/examples/ReactivePropExample.js b/src/examples/ReactivePropExample.js index 808525eb..b4489aab 100644 --- a/src/examples/ReactivePropExample.js +++ b/src/examples/ReactivePropExample.js @@ -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) } }