//html
<div id="myChart" :style="{width: '300px', height: '300px'}"></div>
//按需引入
let echarts = require("echarts/lib/echarts");
require("echarts/lib/chart/bar");//柱状图
require('echarts/lib/chart/line');//线型图
require('echarts/lib/chart/pie');//饼图
require('echarts/lib/chart/radar');//雷达图
require("echarts/lib/component/title");//图表标题
require('echarts/lib/component/dataZoom')//dataZoom组件
require("echarts/lib/component/tooltip");//tooltip
require("echarts/lib/component/legend");//图例
var myChart = echarts.init(document.getElementById("myChart"));
var option={.....}//echarts中图表option
myChart.setOption(option);
Logo

前往低代码交流专区

更多推荐