单个y轴
dataZoom: [
{
type: 'slider',
show: true,
yAxisIndex: [0],
left: '93%',
start: 0, //数据窗口范围的起始百分比
end: 36
},
{
type: 'inside',
yAxisIndex: [0],
start: 0,
end: 36
}
]
单个x轴
dataZoom: [
{
type: "slider",
show: true, // flase直接隐藏图形
xAxisIndex: [0],
left: "9%", // 滚动条靠左侧的百分比
bottom: -5,
start: 10, // 滚动条的起始位置(10%)
end: 90, // 滚动条的终止位置(90%)
},
],
本文详细介绍了Echarts中针对单个y轴和x轴的数据窗口缩放组件(dataZoom)配置,包括slider类型和inside类型的使用,以及start和end属性来设定数据可视范围。通过调整left、bottom等属性,实现滚动条在图表中的位置定制,帮助用户更有效地查看和分析数据。
6296

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



