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/03/02 12:29:18 UTC

[GitHub] [incubator-echarts] LarsKoelpin opened a new issue #12221: Cannot read property 'traverse' of undefined

LarsKoelpin opened a new issue #12221: Cannot read property 'traverse' of undefined
URL: https://github.com/apache/incubator-echarts/issues/12221
 
 
   ### Version
   4.6.0
   
   ### Reproduction link
   [https://jsfiddle.net/3zrLnvqp/](https://jsfiddle.net/3zrLnvqp/)
   
   ### Steps to reproduce
   I attached a JS Fiddle.
   
   When pressing "run" multiple times i get the error.
   
   ```javascript
   echarts.min.js:22 Uncaught TypeError: Cannot read property 'traverse' of undefined
       at e.incrementalRender (echarts.min.js:22)
       at Hh.progress (echarts.min.js:22)
       at tc (echarts.min.js:22)
       at Hh.Zh.perform (echarts.min.js:22)
       at echarts.min.js:22
       at e.<anonymous> (echarts.min.js:22)
       at Array.forEach (<anonymous>)
       at E (echarts.min.js:22)
       at eachSeries (echarts.min.js:22)
       at Zd (echarts.min.js:22)
   ```
   
   When it does not reproduce, increase the amount of data generated (name in example: INCREASE_ME_FOR_REPRODUCTION_CASE)
   
   It may has to do with triggering a rerender too early, when the previous chart wasn't drawn completely
   
   ### What is expected?
   The chart rerenders
   
   ### What is actually happening?
   The error above occurs
   
   <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE -->
   <!-- This issue is in English. 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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #12221: Cannot read property 'traverse' of undefined

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #12221: Cannot read property 'traverse' of undefined
URL: https://github.com/apache/incubator-echarts/issues/12221#issuecomment-593378625
 
 
   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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #12221: Cannot read property 'traverse' of undefined when drawing custom chart

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart
URL: https://github.com/apache/incubator-echarts/issues/12221#issuecomment-593644878
 
 
   That is a bug, happened when data count is larger than the [progressiveThreshold](https://echarts.apache.org/zh/option.html#series-scatter.progressiveThreshold), where progressive rendering is enabled. 
   
   To avoid this issue temporarily, we can simply set:
   ```js
       series: [{
           type: 'custom',
           renderItem: renderItem,
           progressive: 0,                 // Disable progressive
           itemStyle: {
               opacity: 0.8
           },
           data: data
       }]
   ```
   

----------------------------------------------------------------
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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] LarsKoelpin commented on issue #12221: Cannot read property 'traverse' of undefined

Posted by GitBox <gi...@apache.org>.
LarsKoelpin commented on issue #12221: Cannot read property 'traverse' of undefined
URL: https://github.com/apache/incubator-echarts/issues/12221#issuecomment-593396402
 
 
   It seems that the issue does not depend on "setInverval". I also can reproduce the issue when drawing a custom chart with lots of data

----------------------------------------------------------------
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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


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

Posted by GitBox <gi...@apache.org>.
100pah edited a comment on issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart
URL: https://github.com/apache/incubator-echarts/issues/12221#issuecomment-593645599
 
 
   The minimal `option` to reproduce this issue:
   
   ```js
   
   option = {
       yAxis: {
       },
       xAxis: {
       },
       series: [{
           type: 'custom',
           renderItem: function () {},     // the renderItem return nothing.
           progressiveThreshold: 1,       // Enable progressive when data item count > 1
           data: [[123, 456], [654, 321]] // data item count is 2
       }]
   };
   ````
   "`renderItem` is able to returns nothing" is a feature. It should be supported when progressive rendering enabled, rather than throw null pointer exception.
   The bug need to be fixed.

----------------------------------------------------------------
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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


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

Posted by GitBox <gi...@apache.org>.
100pah commented on issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart
URL: https://github.com/apache/incubator-echarts/issues/12221#issuecomment-593645599
 
 
   The minimal `option` to reproduce this issue:
   
   ```js
   
   option = {
       yAxis: {
       },
       xAxis: {
       },
       series: [{
           type: 'custom',
           renderItem: function () {},     // the renderItem return nothing.
           progressiveThreshold: 1,       // Enable progressive when data item count > 1
           data: [[123, 456], [654, 321]] // data item count is 2
       }]
   };
   ````
   
   The bug need to be fixed.

----------------------------------------------------------------
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: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [echarts] pissang closed issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart

Posted by GitBox <gi...@apache.org>.
pissang closed issue #12221:
URL: https://github.com/apache/echarts/issues/12221


   


-- 
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] WenBinWu commented on issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart

Posted by GitBox <gi...@apache.org>.
WenBinWu commented 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


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

Posted by GitBox <gi...@apache.org>.
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


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

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


   The `progressive: 0` works like a charm but the charts are lagging so bad when the user is hovering a specific data point.


----------------------------------------------------------------
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] WenBinWu edited a comment on issue #12221: Cannot read property 'traverse' of undefined when drawing custom chart

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
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


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

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


   has this problem been resolved?


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