You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "minghangben (via GitHub)" <gi...@apache.org> on 2023/06/01 04:01:19 UTC

[GitHub] [echarts] minghangben opened a new issue, #18691: [Feature] How to make line-chart smoother when update data

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

   ### What problem does this feature solve?
   
   demo:
   
   
   `function randomData() {
     now = new Date(+now + oneDay);
     value = value + Math.random() * 21 - 10;
     return {
       name: now.toString(),
       value: [
         [now.getFullYear(), now.getMonth() + 1, now.getDate()].join('/'),
         Math.round(value)
       ]
     };
   }
   let data = [];
   let now = new Date(1997, 9, 3);
   let oneDay = 24 * 3600 * 1000;
   let value = Math.random() * 1000;
   for (var i = 0; i < 1000; i++) {
     data.push(randomData());
   }
   option = {
     title: {
       text: 'Dynamic Data & Time Axis'
     },
     xAxis: {
       type: 'time',
       splitLine: {
         show: false
       }
     },
     yAxis: {
       type: 'value',
       min: 'dataMin',
         max: 'dataMax',
       boundaryGap: [0, '100%'],
       splitLine: {
         show: false
       }
     },
     series: [
       {
         name: 'Fake Data',
         type: 'line',
         showSymbol: false,
         data: data,
         animationDurationUpdate: 1000,
       }
     ]
   };
   setInterval(function () {
     for (var i = 0; i < 5; i++) {
       data.shift();
       data.push(randomData());
     }
     myChart.setOption({
       series: [
         {
           data: data
         }
       ]
     });
   }, 1000);`
   
   ### What does the proposed API look like?
   
   
   https://github.com/apache/echarts/assets/127271826/8401ffc6-4f39-4b2f-971b-31b0ebcb66f2
   
   just like this,update data smoother


-- 
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] minghangben closed issue #18691: [Bug] How to make line-chart smoother when update data?

Posted by "minghangben (via GitHub)" <gi...@apache.org>.
minghangben closed issue #18691: [Bug] How to make line-chart smoother when update data?
URL: https://github.com/apache/echarts/issues/18691


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