option = {
title: {
text: '折线图堆叠',
top: '10%',
left: 'center',
},
legend: { //展现了不同系列的图例(标记,颜色和名字)。可以通过点击图例控制哪些系列不显示。
data:['邮件营销','联盟广告','视频广告','直接访问','搜索引擎']
},
grid: { //图表在容器中的位置和大小
left: '5%',
right: '4%',
bottom: '3%',
width:'80%',
containLabel: true
},
tooltip: { //鼠标滑过数据项触发提示框
formatter: 'Group {b}: ({c})' //b为x轴数据,c为y轴数据
},
xAxis: {
show:true, //false:不显示x轴
type: 'category',
boundaryGap: true, //false:坐标轴两边不留边距
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] //X轴数据
},
yAxis: {
show:true, //false:不显示y轴
Echarts折线图柱形图样式详解
最新推荐文章于 2023-09-14 10:37:09 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)