You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/06/18 19:35:38 UTC

[GitHub] [incubator-echarts] umutcanbolat opened a new issue #10700: add startValue and endValue parameters in zoom event triggered by slider

umutcanbolat opened a new issue #10700: add startValue and endValue parameters in zoom event triggered by slider
URL: https://github.com/apache/incubator-echarts/issues/10700
 
 
   ### What problem does this feature solve?
   When user uses slider to zoom the chart, the event triggered does not have parameters `startValue` and `endValue`. It only has `start` and `end` percentage values. 
   
   ### What does the proposed API look like?
   ### Version
   4.2.1
    
   ### Reproduction link
   https://ecomfe.github.io/echarts-examples/public/editor.html?c=doc-example/getting-started
    
   ### Steps to reproduce
   - Please copy the following code into input on the left side.
   
    
   ```javascript
   option = {
       title: {
           text: 'ECharts 入门示例'
       },
       tooltip: {},
       legend: {
           data:['销量']
       },
       xAxis: {
           data: ["衬衫","羊毛衫","雪纺衫","裤子","高跟鞋","袜子"]
       },
       yAxis: {},
       series: [{
           name: '销量',
           type: 'line',
           data: [5, 20, 36, 10, 10, 20]
       }],
       dataZoom: [
           {
               type: 'slider',
               show: true,
               realtime: false
           },    
       ]
   };
   
   myChart.on('dataZoom', function (params) {
       console.log(params);
       
       // should return exact values, but returns undefined
       console.log(params.startValue);
       console.log(params.endValue);
   });
   ```
    
   - Then try to zoom the chart and have a look at console.
    
   ### What is expected?
   As described in the [docs](https://echarts.apache.org/en/api.html#events.datazoom), datazoom event includes `startValue` and `endValue` in the payload if the event is triggered by using toolbox. But I think the datazoom event (triggered by the slider) should also take parameters `startValue` and `endValue` besides `start` and `end` percentage parameters.
    
   ### What is actually happening?
   `startValue` and `endValue` parameters are not included in the payload of the event.
   
   Thank you.
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. DO NOT REMOVE -->

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org