How to get value of start and end in dataZoom changed event in echarts baidu?

时间:2017-12-18 07:30:38

标签: vue.js echarts

How to get value of '/gateway/success' and start in dataZoom changed event in echarts baidu?

1 个答案:

答案 0 :(得分:1)

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

Documentation on IEcharts