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 2021/11/04 07:34:44 UTC

[GitHub] [echarts] akiko123456 opened a new issue #16011: 折线图数据更新无动画,很生硬

akiko123456 opened a new issue #16011:
URL: https://github.com/apache/echarts/issues/16011


   ### Version
   5.0.2
   
   ### Steps to reproduce
   let data = [820, 932, 901, 934, 1290, 1330, 1320]
   let data2 = [820, null, null, null, null, null, null]
   option = {
     xAxis: {
       type: 'category',
       boundaryGap: false,
       data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
     },
     yAxis: {
       type: 'value'
     },
     series: [{
        data: data2,
       type:"line"
     }
     ]
   };
   
   let index = 0;
   setInterval(()=>{
     index    ;
     if(index > data.length){
       index = 0;
       data2 = [null, null, null, null, null, null, null];
     }
     data2[index] = data[index];
     option.series = [
       {
         data: data2,
         type: 'line',
         areaStyle: {},
         // animationDurationUpdate:5000
       }
     ]
     myChart.setOption(option)
   },1000)
   
   ### What is expected?
   折线图数据更新无动画,生硬
   
   ### What is actually happening?
   数据更新后折线会有画过去的动画
   
   <!-- 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.

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


[GitHub] [echarts] echarts-bot[bot] commented on issue #16011: 折线图数据更新无动画,很生硬

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






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