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
})


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM