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/12/18 02:25:39 UTC

[GitHub] [incubator-echarts] fightGitHub93 commented on issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart

fightGitHub93 commented on issue #12221:
URL: https://github.com/apache/incubator-echarts/issues/12221#issuecomment-747826098


   > Add some code in function of incrementalRender may fix this issue.
   > `
   > incrementalRender: function (params, customSeries, ecModel, api, payload) {
   > var data = customSeries.getData();
   > var renderItem = makeRenderItem(customSeries, data, ecModel, api);
   > function setIncrementalAndHoverLayer(el) {
   > if (!el.isGroup) {
   > el.incremental = true;
   > el.useHoverLayer = true;
   > }
   > }
   > for (var idx = params.start; idx < params.end; idx++) {
   > var el = createOrUpdate$1(null, idx, renderItem(idx, payload), customSeries, this.group, data);
   > **+ if (el)**
   > el.traverse(setIncrementalAndHoverLayer);
   > }
   > },
   > 
   > `我也使用了同样的方式修改了源码,这样是否可行,会不会引起其他的问题?
   


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