refactor(social-box-chart-example): props

This commit is contained in:
xidedix
2018-04-05 15:14:35 +02:00
parent c967f6c5b3
commit 97c6834fdb
+10 -1
View File
@@ -3,7 +3,16 @@ import { Line } from 'vue-chartjs'
export default { export default {
extends: Line, extends: Line,
props: ['data', 'height'], props: {
data: {
type: Array,
default: () => [0, 22, 34, 46, 58, 70, 46]
},
height: {
type: String,
default: '100'
}
},
mounted () { mounted () {
this.renderChart({ this.renderChart({
labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'], labels: ['January', 'February', 'March', 'April', 'May', 'June', 'July'],