实现效果:

option = {
"tooltip": {
"show": true,
"trigger": "axis",
"axisPointer": {
"type": "cross",
"axis": "x"
}
},
"color": ["#ffff00", "#00ff00", "#ff0000"],
"axisPointer": {
"link": {
"xAxisIndex": "all"
},
"label": {
"backgroundColor": "#777"
}
},
legend:{
},
"grid": [{
"left": 120,
"right": 30,
"top": "45px",
"backgroundColor": "#ccc",
"height": "120"
}, {
"left": 120,
"right": 30,
&nb

本文展示了如何使用Echarts在同一容器中创建并使多个图表联动,通过配置tooltip、axisPointer、grid等属性,实现了图表之间的数据交互和视觉同步效果。包括两个线性图示例1和示例2,它们共享同一X轴,且具有markLine标记线功能。
最低0.47元/天 解锁文章
4276

被折叠的 条评论
为什么被折叠?



