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 2020/04/30 07:52:53 UTC

[GitHub] [incubator-echarts] zpf96126 opened a new issue #12545: 动态数据 时间坐标轴,以秒为最小单位时,每分钟的前10秒数据未被绘制

zpf96126 opened a new issue #12545:
URL: https://github.com/apache/incubator-echarts/issues/12545


   ### Version
   4.7.0
   
   ### Reproduction link
   [https://www.echartsjs.com/examples/zh/editor.html?c=dynamic-data2](https://www.echartsjs.com/examples/zh/editor.html?c=dynamic-data2)
   
   ### Steps to reproduce
   将随机数值函数修改为
   function randomData() {
       now = new Date();
       value = value   Math.random() * 21 - 10;
       return {
           name: now.toString(),
           value: [
               [now.getFullYear(), now.getMonth()   1, now.getDate()].join('/') " " [now.getHours(), now.getMinutes(), now.getSeconds()].join(':'),
               Math.round(value)
           ]
       };
   }
   将格式化日期修改为
       tooltip: {
           trigger: 'axis',
           formatter: function (params) {
               params = params[0];
               var date = new Date(params.name);
               return date.getDate()   '/'   (date.getMonth()   1)   '/'   date.getFullYear() ' ' date.getHours()   ':'   date.getMinutes()   ':'   date.getSeconds()   ' : '   params.value[1];
           },
           axisPointer: {
               animation: false
           }
       },
   
   ### What is expected?
   能够按秒显示动态数据折线
   
   ### What is actually happening?
   每分钟的前10秒会卡住,然后不绘制这段时间内的折线
   
   <!-- 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:
users@infra.apache.org



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


[GitHub] [incubator-echarts] 100pah commented on issue #12545: 动态数据 时间坐标轴,以秒为最小单位时,每分钟的前10秒数据未被绘制

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #12545:
URL: https://github.com/apache/incubator-echarts/issues/12545#issuecomment-621707670


   `randomData` 里使用的是 new Date()
   所得到的值是不确定的值。所以并不确定形成的数据在哪个时间点上。


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-echarts] echarts-bot[bot] commented on issue #12545: 动态数据 时间坐标轴,以秒为最小单位时,每分钟的前10秒数据未被绘制

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


   Hi! We've received your issue and please be patient to get responded. 🎉
   The average response time is expected to be within one day for weekdays.
   
   In the meanwhile, please make sure that **you have posted enough image to demo your request**. You may also check out the [API](http://echarts.apache.org/api.html) and [chart option](http://echarts.apache.org/option.html) to get the answer.
   
   If you don't get helped for a long time (over a week) or have an urgent question to ask, you may also send an email to dev@echarts.apache.org. Please attach the issue link if it's a technical questions.
   
   If you are interested in the project, you may also subscribe our [mail list](https://echarts.apache.org/en/maillist.html).
   
   Have a nice day! 🍵


----------------------------------------------------------------
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:
users@infra.apache.org



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


[GitHub] [incubator-echarts] zpf96126 commented on issue #12545: 动态数据 时间坐标轴,以秒为最小单位时,每分钟的前10秒数据未被绘制

Posted by GitBox <gi...@apache.org>.
zpf96126 commented on issue #12545:
URL: https://github.com/apache/incubator-echarts/issues/12545#issuecomment-624412833


   我把function randomData() {
   now = new Date();
   value = value Math.random() * 21 - 10;
   return {
   name: now.toString(),
   value: [
   [now.getFullYear(), now.getMonth() 1, now.getDate()].join('/') +" "+ [now.getHours(), now.getMinutes(), now.getSeconds()].join(':'),
   Math.round(value)
   ]
   };
   }
   改成
   function randomData() {
   now = new Date();
   value = value Math.random() * 21 - 10;
   var ds;
   if (now.getSeconds()< 10) {
         ds = "0" + now.getSeconds().toString();
    } else {
         ds = now.getSeconds().toString();
    }
   return {
   name: now.toString(),
   value: [
   [now.getFullYear(), now.getMonth() 1, now.getDate()].join('/')+ " "+ [now.getHours(), now.getMinutes(), ds].join(':'),
   Math.round(value)
   ]
   };后正常了
   }


----------------------------------------------------------------
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:
users@infra.apache.org



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