mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-30 23:32:38 +00:00
examples: update to vue-chartjs 3.0.0 (#2580)
* chore(dependencies): Update vue-chartjs and chartjs to latest version * refactor(examples): Update component creation of charts
This commit is contained in:
parent
6dce671498
commit
c4c63e0c66
@ -1,8 +1,9 @@
|
|||||||
import { Bar } from 'vue-chartjs'
|
import { Bar } from 'vue-chartjs'
|
||||||
|
|
||||||
export default Bar.extend({
|
export default {
|
||||||
|
extends: Bar,
|
||||||
props: ['data', 'options'],
|
props: ['data', 'options'],
|
||||||
mounted() {
|
mounted() {
|
||||||
this.renderChart(this.data, this.options)
|
this.renderChart(this.data, this.options)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import { Doughnut } from 'vue-chartjs'
|
import { Doughnut } from 'vue-chartjs'
|
||||||
|
|
||||||
export default Doughnut.extend({
|
export default {
|
||||||
|
extends: Doughnut,
|
||||||
props: ['data', 'options'],
|
props: ['data', 'options'],
|
||||||
mounted() {
|
mounted() {
|
||||||
this.renderChart(this.data, this.options)
|
this.renderChart(this.data, this.options)
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
"name": "vue-chartjs-nuxt",
|
"name": "vue-chartjs-nuxt",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.16.2",
|
"axios": "^0.16.2",
|
||||||
"chart.js": "^2.6.0",
|
"chart.js": "^2.7.1",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
"nuxt": "latest",
|
"nuxt": "latest",
|
||||||
"vue-chartjs": "^2.8.2"
|
"vue-chartjs": "^3.1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "nuxt",
|
"dev": "nuxt",
|
||||||
|
Loading…
Reference in New Issue
Block a user