var myChart;
$(function () {
// 基于准备好的dom,初始化echarts实例,获取的是html中的id
myChart = echarts.init(document.getElementById(‘main’));
// 指定图表的配置项和数据
var option1 = {
title : {
text: ‘阶段说明’,
x:‘center’
},
tooltip : {
trigger: ‘item’,
formatter: “{a}
{b} : {c} ({d}%)”
},
legend: {
orient : ‘vertical’,
x : ‘left’,
data:[‘前期’,‘中期’,‘后期’]
},
toolbox: {
show : true,
feature : {
mark : {show: true},
dataView : {show: true, readOnly: false},
magicType : {
show: true,
type: [‘pie’, ‘funnel’],
option: {
funnel: {
x: ‘25%’,
width: ‘50%’,
funnelAlign: ‘left’,
max: 1548
}
}
},
restore : {show: true},
saveAsImage : {show: true}
}
},
calculable : true,
series :
Echars基本用法代码
最新推荐文章于 2024-06-15 13:07:44 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)