option_array: [{
api: service.DATABASEPATH + "/home-server/indexPort",
method: "GET",
params: {
indexid: "shzl001",
type: mouth
},
headers: {
"Content-Type": "application/json",
},
color: ["#4367fd", "#51e0ff"],
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
confine:true
},
dataZoom: {
type: 'inside',
start: 0,
maxValueSpan: 3,
orient: 'vertical',
},
}]
添加dataZoom
dataZoom: {
type: 'inside',
start: 0,
maxValueSpan: 3,
orient: 'vertical', //纵向滚动
},
dataZoom:[
{
type: 'slider',
maxValueSpan:4,//显示数据的条数(默认显示10个)
show: true,
yAxisIndex: [0],
left: '93%', //滑动条位置
start:0,//默认为0
end: 70,//默认为100
orient:"vertical",
filterMode: 'empty',
zoomLock:true,
},
{
type: 'inside', //内置滑动,随鼠标滚轮展示
yAxisIndex: [0],
start: 1,//初始化时,滑动条宽度开始标度
end: 100, //初始化时,滑动条宽度结束标度
zoomOnMouseWheel:false, //如何触发缩放。可选值为:true:表示不按任何功能键,鼠标滚轮能触发缩放。false:表示鼠标滚轮不能触发缩放。'shift':表示按住 shift 和鼠标滚轮能触发缩放。'ctrl':表示按住 ctrl 和鼠标滚轮能触发缩放。'alt':表示按住 alt 和鼠标滚轮能触发缩放。。
moveOnMouseMove:true,
moveOnMouseWheel:true,//鼠标滚轮实现移动
}
],