meetpasser opened a new issue #14366:
URL: https://github.com/apache/echarts/issues/14366


   ### Version
   5.0.2
   
   ### Steps to reproduce
   在官方demo中 https://echarts.apache.org/examples/zh/editor.html?c=line-smooth 
更改示例:
   
   ```
   var option = {
           grid: {
             left: "10%",
             right: "10%",
             borderWidth: 10,
           },
           dataZoom: [
             {
               type: "inside",
               start: 90,
               end: 100,
               // startValue: 
               xAxisIndex: [0],
               zoomLock: true,
               minValueSpan:5,
               maxValueSpan:15,
             },
           ],
           xAxis: {
             type: "category",
             boundaryGap: true,
             // data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
             data: [],
           },
           yAxis: {
             boundaryGap: [0, "30%"],
             type: "value",
           },
           series: [
             {
               name: "common",
               // data: [820, 932, 901, 934, 1290, 1330, 1320],
               data: [],
               type: "line",
               smooth: true,
               symbol: "none",
               // areaStyle: {
               // normal: {}
               // },
               stack:'a',
               animationEasing: "quadraticOut",
               animationDuration: 300,
               animationDurationUpdate: 1000,
               animationEasingUpdate: "quarticIn",
             },
           ],
         };
   
    var category = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
         var data = [820, 932, 901, 934, 1290, 1330, 1320];
   
   function run(){
        myChart.setOption(option);
   }
   
   setTimeout(function() {
       run();
   }, 0);
   
         var i = 0;
         setInterval(() => {
           console.log("INTERVAL "   i);
   
   //1. 此种方式添加数据会有动画显示
           // category.push("Mon");
           if (i == 0) {
               // 2. 此种方式添加不会显示动画
             category.push("Mon", "Tue", "Wed", "Thu", "Fri");
             console.log("aa");
           }
           i  ;
           if (i == 5) i = 0;
   
           data.push(Math.random() * 1000);
   
           myChart.setOption({
             xAxis: {
               data: category,
             },
             series: {
               name: "common",
               data: data,
             },
           });
         }, 1000);
   ```
   
   1.  单独添加数据
   category.push("Mon");
   
   2. 先添加x轴多个数据
     category.push("Mon", "Tue", "Wed", "Thu", "Fri");
   
   ### 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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to