echarts拖动datazoom获取起始值

dataZoom : [ 
{
show:true,
xAxisIndex:[0],
type:‘slider‘,
bottom:‘2%‘,
left:‘center‘,
startValue:start,
endValue:end,
orient:‘horizontal‘,
realtime:false, //datazoom拖动完成后触发拖动事件
},
]


let that =this
let myChartobj=that.$echarts.init(document.getElementById(‘dataZoomEventEchart‘))
myChartobj.on( ‘datazoom‘, function (params) { //监听echarts的拖动事件
that.dataZoomloading=true
let xAxis = myChartobj.getModel().option.dataZoom[0];
let startrang=xAxis.startValue
let endrang=xAxis.endValue
})

echarts拖动datazoom获取起始值

上一篇:EF优化—预热


下一篇:删除链表倒数第N个节点