You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2022/06/16 07:58:23 UTC

[GitHub] [echarts] lyrebirth opened a new issue, #17226: [Bug] Series 类型为 line 时的 animationDuration function 执行的次数异常,idx 传参 丢失

lyrebirth opened a new issue, #17226:
URL: https://github.com/apache/echarts/issues/17226

   ### Version
   
   5.3.3
   
   ### Link to Minimal Reproduction
   
   https://codepen.io/lyrebirth/pen/LYQaZQm
   
   ### Steps to Reproduce
   
   option:
   
   var xAxisData = [];
   var data1 = [];
   var data2 = [];
   for (var i = 0; i < 100; i++) {
     xAxisData.push('A' + i);
     data1.push((Math.sin(i / 5) * (i / 5 - 10) + i / 6) * 5);
     data2.push((Math.cos(i / 5) * (i / 5 - 10) + i / 6) * 5);
   }
   option = {
     xAxis: {
       data: xAxisData,
     },
     yAxis: {},
     series: [
       {
         name: 'line',
         type: 'line',
         data: data1,
         animationDuration: function (idx) {
           // 越往后的数据时长越大
           console.log('ddd',idx)
           return 3600;
         }
       },
     ],
   };
   
   You can put it to demo.
   
   ### Current Behavior
   
   When the type is 'line',the output of the console is as follow:
   ![20220616155012](https://user-images.githubusercontent.com/62588055/174021166-8a3d9f42-c79d-4d8b-9b30-0cf45ceccf50.png)
   It is error !
   What I want to see is the output frequency about 'ddd xxx' and the length of data are equality !
   
   If we change the type from 'line' to 'bar' , and you can see the result is right !
   
   ![20220616155512](https://user-images.githubusercontent.com/62588055/174021477-a343a7c2-dbb3-4e4d-b46a-370108efb478.png)
   
   
   
   ### Expected Behavior
   
   What I want to see is the output frequency about 'ddd xxx' and the length of data are equality !
   
   ### Environment
   
   ```markdown
   - OS: Windows
   - Browser: Edge
   - Framework: Vue3.2(You can do it on your own Website's demo)
   ```
   
   
   ### Any additional comments?
   
   _No response_


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [echarts] echarts-bot[bot] commented on issue #17226: [Bug] Series 类型为 line 时的 animationDuration function 执行的次数异常,idx 传参 丢失

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #17226:
URL: https://github.com/apache/echarts/issues/17226#issuecomment-1157354586

   @lyrebirth It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
   <details><summary><b>TRANSLATED</b></summary><br>
   
   **TITLE**
   
   [Bug] The number of times the animationDuration function was executed was abnormal when the Series type is line, and the idx pass parameter is missing
   </details>


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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