vue-echarts-v3 介绍
特征
轻量,高效,按需绑定事件;
支持 按需导入ECharts.js图表??和组件;
支持 组件调整大小事件 自动 更新视图;
安装
npm install --save echarts vue-echarts-v3
用法
<template><div class="echarts"><IEcharts:option="bar":loading="loading"@ready="onReady"@click="onClick"/><button @click="doRandom">Random</button></div></template><script type="text/babel">import IEcharts from 'vue-echarts-v3/src/full.js';export default {name: 'view',components: {IEcharts},props: {},data: () => ({loading: true,bar: {title: {text: 'ECharts Hello World'},tooltip: {},xAxis: {data: ['Shirt','Sweater','Chiffon Shirt','Pants','High Heels','Socks']},yAxis: {},series: [{name: 'Sales',type: 'bar',data: [5,20,36,10,20]}]}}),methods: {doRandom() {const that = this;let data = [];for (let i = 0,min = 5,max = 99; i < 6; i++) {data.push(Math.floor(Math.random() * (max + 1 - min) + min));}that.loading = !that.loading;that.bar.series[0].data = data;},onReady(instance,ECharts) {console.log(instance,ECharts);},onClick(event,instance,ECharts) {console.log(arguments);}}};</script><style s cop ed>.echarts {width: 400px;height: 400px;}</style> 链接 : http://www.fly63.com/nav/2255网站地址 : https://xlsdg.org/vue-echarts-v3-demo/
GitHub: https://github.com/xlsdg/vue-echarts-v3
网站描述: ECharts.js的Vue.js组件包装
vue-echarts-v3官方网站
官方网站: https://xlsdg.org/vue-echarts-v3-demo/
如果觉得 网站内容还不错,欢迎将 网站 推荐给程序员好友。
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did176597