yanwencheng opened a new issue #12060: 动态线图数据更新bug
URL: https://github.com/apache/incubator-echarts/issues/12060
 
 
   ### Version
   4.5.0
   
   ### Steps to reproduce
   var base =  new Date(2014, 9, 3);
   var oneDay = 24 * 3600 * 1000;
   var date = [];
   
   var data = [Math.random() * 150];
   var now = new Date(base);
   
   function addData(shift) {
       now = [now.getFullYear(), now.getMonth()   1, now.getDate()].join('/');
       date.push(now);
       data.push((Math.random() - 0.4) * 10   data[data.length - 1]);
   
       if (shift) {
           date.shift();
           data.shift();
       }
   
       now = new Date( new Date(now)   oneDay);
   }
   
   for (var i = 1; i < 100; i  ) {
       addData();
   }
   
   option = {
       xAxis: {
           type: 'category',
           boundaryGap: false,
           data: date
       },
       yAxis: {
           boundaryGap: [0, '50%'],
           type: 'value'
       },
       dataZoom: [{
                           start: 70,
                           // zoomLock: true,
                       }],
       series: [
           {
               name:'成交',
               type:'line',
               data: data
           }
       ]
   };
   
   setInterval(function () {
       for(var i=0;i<5;i  ){
         addData(true);
       }
       myChart.setOption({
           xAxis: {
               data: date
           },
           series: [{
               name:'成交',
               data: data
           }]
       });
   }, 1000);
   
   ### What is expected?
   正常渲染
   
   ### What is actually happening?
   左侧出现两点连线不规则折断
   
   <!-- This issue is generated by echarts-issue-helper. 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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to