步骤一
安装:
npm i v-charts echarts -S
步骤二
1.依赖引入:
在main.js 中引入:
import VCharts from 'v-charts'
Vue.use(VCharts)
2.在组件中引入:
import VeLine from 'v-charts/lib/line'//折线
import VeHistogram from 'v-charts/lib/histogram'//柱状
import VeBar from 'v-charts/lib/bar'//横-柱状
import VePie from 'v-charts/lib/pie'//圆状
import VeRing from 'v-charts/lib/ring'//环状
import VeWaterfall from 'v-charts/lib/waterfall'//瀑布
import VeFunnel from 'v-charts/lib/funnel'//金字塔
import VeRadar from 'v-charts/lib/radar'//雷
export default {
components: { VeLine,VeHistogram,VeBar,VePie,VeRing,VeWaterfall,VeFunnel,VeRadar},
......
}
3.具体使用详见官方文档
文档地址: https://v-charts.js.org/#/line
本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!