sxmpasch commented on issue #9258: timeline在ie下性能问题 URL: https://github.com/apache/incubator-echarts/issues/9258#issuecomment-433738959 @Ajaxluo - thank you for the example. If you add / remove elements, it takes time to recalculate the average value. Since you do not have zoom enabled, perhaps a data reduction during init could be everything you need: 谢谢你的例子。如果添加/删除元素,则需要时间重新计算平均值。由于您没有启用缩放,因此初始化期间的数据缩减可能是您需要的一切: ``` var it=0; var numItems=80000; // number of data elements var numAvg=20; // number of data items to reduce to one average element for (var i = 0; i < numItems; i++) { data.push(randomData()); } var dredIdx=0; var d=0, dsum=0; for (var i=0; i<numItems; i++) { dsum+=data[i].value[1]; if ((i% numAvg)===0) { d=data[i]; d.value[1]=dsum/numAvg; dsum=0; dred.push(d); } } ... setInterval(function () { for (var i = 0; i < 5; i++) { dred.shift(); dred.push(randomData()); } var s = 'test #'+it; it++; myChart.setOption({ title: {text:s }, series: [{ data: dred }] }); }, 2000); ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
