echarts图表添加纵向滚动条
时间:2023-10-16 16:07:02
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//默认为1000 orient:"vertical", filterMode: 'empty', zoomLock:true, }, { type: 'inside', ///内置滑动,随鼠标滚轮展示 yAxisIndex: [0], start: 一、//初始化时,滑条宽度开始标度 end: 100, ///初始化时,滑动条宽度结束标度 zoomOnMouseWheel:false, ///如何触发缩放。可选值为:true:鼠标滚轮可以触发缩放,而不按任何功能键。可选值为:true:鼠标滚轮可以触发缩放,而不按任何功能键。false:表示鼠标滚轮不能触发缩放。'shift表示按住 shift 鼠标滚轮可触发缩放。'ctrl表示按住 ctrl 鼠标滚轮可触发缩放。'alt表示按住 alt 鼠标滚轮可触发缩放。。 moveOnMouseMove:true, moveOnMouseWheel:true,///鼠标滚轮移动 } ],