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/07/16 06:28:13 UTC

[GitHub] [incubator-echarts] WenBinWu edited a comment on issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart

WenBinWu edited a comment on issue #12221:
URL: https://github.com/apache/incubator-echarts/issues/12221#issuecomment-659186157


   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