使用V-chart时踩过的一些坑
https://www.jianshu.com/p/46d844355f50
<template> <ve-histogram :data="chartData" :extend="chartExtend"></ve-histogram> </template> <script> export default { data () { this.chartExtend = { series: { barWidth: 10 }, tooltip: { trigger: 'none' } } /* 等同于 this.chartExtend = { series (v) { v.forEach(i => { i.barWidth = 10 }) return v }, tooltip (v) { v.trigger = 'none' return v } } 等同于 this.chartExtend = { 'series.0.barWidth': 10, 'series.1.barWidth': 10, 'tooltip.trigger': 'none' } */ return { chartData: { ... } } } } </script>