mirror of
https://github.com/KevinMidboe/vue-chartjs.git
synced 2025-10-29 18:00:20 +00:00
Update README.md
fix the syntax error of the example
This commit is contained in:
@@ -68,7 +68,7 @@ You can overwrite the default chart options. Just pass the options object as a s
|
|||||||
import { Line } from 'vue-chartjs'
|
import { Line } from 'vue-chartjs'
|
||||||
|
|
||||||
export default Line.extend({
|
export default Line.extend({
|
||||||
props: [data, options],
|
props: ["data", "options"],
|
||||||
mounted () {
|
mounted () {
|
||||||
this.renderChart(this.data, this.options)
|
this.renderChart(this.data, this.options)
|
||||||
}
|
}
|
||||||
@@ -107,8 +107,8 @@ The mixins automatically create `chartData` as a prop or data. And add a watcher
|
|||||||
import { Line, reactiveProp } from 'vue-chartjs'
|
import { Line, reactiveProp } from 'vue-chartjs'
|
||||||
|
|
||||||
export default Line.extend({
|
export default Line.extend({
|
||||||
mixins: [reactiveProp]
|
mixins: [reactiveProp],
|
||||||
props: [chartData, options],
|
props: ["chartData", "options"],
|
||||||
mounted () {
|
mounted () {
|
||||||
this.renderChart(this.chartData, this.options)
|
this.renderChart(this.chartData, this.options)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user