You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2019/03/18 08:39:20 UTC
[GitHub] [incubator-echarts] CarterLi edited a comment on issue #9232: Use
OffScreenCanvas API for big data live charts
CarterLi edited a comment on issue #9232: Use OffScreenCanvas API for big data live charts
URL: https://github.com/apache/incubator-echarts/issues/9232#issuecomment-473817179
Got some progress.
Like what @skortchmark9 said, Echarts itself has very good worker-env support, but no interaction.
Three major problems:
1. Echarts [won't bind any mouse events in worker-env](https://github.com/ecomfe/zrender/blob/ba969fd4100ae0b667ee3d5b7a2d4c1217a52ce1/src/zrender.js#L133). I didn't find any solution other then modifying the source code.
2. Echarts [incorrectly doesn't think the browser support DomLevel2 in worker-env](https://github.com/ecomfe/zrender/blob/ba969fd4100ae0b667ee3d5b7a2d4c1217a52ce1/src/core/event.js#L10), result in using attachEvent. We can work around this by setting `window` and addEventListener property on global this of worker.
3. Of course browser won't trigger any mouse events in worker-env. We have to dispatch those events from UI thread.
Working example: https://github.com/CarterLi/echarts-with-offscreencanvas
----------------------------------------------------------------
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
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org