如何在dataZoom中获得start
和end
的价值在echarts baidu中改变了事件?
收听dataZoom更改后由eCharts调度的dataZoom事件。
myChart.on('dataZoom', function(e) {
console.log(e); // All params
console.log(e.start); // Start value
console.log(e.end) // End value
});
Documentation on dataZoom event
将eCharts与vue.js库一起使用时:
模板:
<IECharts @dataZoom="updateZoom"></IECharts>
代码(换自methods
):
methods: {
updateZoom(e) {
// See all available properties of the event
console.log(e);
}
}