refactor(social-box-chart-example): props
This commit is contained in:
@@ -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'],
|
||||||
|
|||||||
Reference in New Issue
Block a user