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/10/16 10:49:11 UTC

[GitHub] [incubator-echarts] clown-helang opened a new issue #13441: Uncaught TypeError: Cannot set property '0' of undefined

clown-helang opened a new issue #13441:
URL: https://github.com/apache/incubator-echarts/issues/13441


   ### Version
   echarts@4.9.0
   
   ### Reproduction link
   [https://codepen.io/HeLang582/pen/QWENEom?editors=1011](https://codepen.io/HeLang582/pen/QWENEom?editors=1011)
   
   ### Steps to reproduce
   1. Create a line graph to create horizontal scrolling effect when too much data is set.(创建一个折线图,设置数据过多时出现水平滚动效果。)
   2. Drag the horizontal scroll bar back and forth repeatedly to reproduce the error, the X-axis coordinates will overlap, and the rendering of the value will be chaotic(反复来回拖动水平滚动条即可复现报错,x轴坐标会出现重叠现象,值的渲染也会出现混乱)
   
   ### What is expected?
   Graphics rendering correctly, no error reporting(图形渲染正确,不要有报错)
   
   ### What is actually happening?
   Through the error checking in the Console, it was found that there is an interpolateArray method in the Animator file of ZRender, the length of the parameter Out passed at the time of invocation is not the same as the length of P0 and P1, resulting in an error in the assignment, so we need to do an interpolating processing: the following code(通过console中报错检查,发现在ZRender的Animator文件中有一个interpolateArray方法,在调用执行的时候传给的参数out的长度和p0以及p1的长度不一样,导致赋值报错, 所以需要做一下兼容处理:具体代码如下:):
   ```
   function interpolateArray(p0, p1, percent, out, arrDim) {
     
     var len = p0.length;
   
     if (arrDim === 1) {
       for (var i = 0; i < len; i  ) {
         out[i] = interpolateNumber(p0[i], p1[i], percent);
       }
     } else {
       var len2 = len && p0[0].length;
   
       for (var i = 0; i < len; i  ) {
         for (var j = 0; j < len2; j  ) {
   		/* 
   		* 由于out的length可能和p0, p1的length不一样导致out[i][j]赋值的时候会报错,
   		* 所以需要添加一个if判断,如果out[i]不存在,则给out[i]赋值一个空数组,这样可以保证代码不报错
   		*/
   		if (!out[i]) out[i] = [];
           out[i][j] = interpolateNumber(p0[i][j], p1[i][j], percent);
         }
       }
     }
   }
   ```
   
   Through the above compatibility processing, normal data update of ECharts can be guaranteed without the problem of horizontal coordinate overlap. Fundamentally speaking, there should be some bugs in echarts data rendering. Since it is difficult to check, I did not locate the root cause.So I hope the authorities can fix this problem(通过上面的兼容处理可以保证echarts正常的数据更新不会出现横坐标重叠的问题,从根本上讲应该是echarts数据渲染上存在有BUG,由于不好排查的,所以我没有去定位根因。所以希望官方可以修复一下这个问题。).
   
   ---
   The problem can be reproduced on codePen, which is a relatively serious problem, resulting in overlapping problems in chart rendering(问题可以在codePen上复现,是一个较为严重的问题,会导致图表渲染出现重叠问题).
   
   <!-- 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



---------------------------------------------------------------------
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 #13441: Uncaught TypeError: Cannot set property '0' of undefined

Posted by GitBox <gi...@apache.org>.
echarts-bot[bot] commented on issue #13441:
URL: https://github.com/apache/incubator-echarts/issues/13441#issuecomment-709972844


   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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


[GitHub] [incubator-echarts] plainheart edited a comment on issue #13441: Uncaught TypeError: Cannot set property '0' of undefined

Posted by GitBox <gi...@apache.org>.
plainheart edited a comment on issue #13441:
URL: https://github.com/apache/incubator-echarts/issues/13441#issuecomment-711447649


   Thanks for reporting. Seems to be related to #12815, and @pissang pushed a commit https://github.com/ecomfe/zrender/commit/94baa6ee141ce3d281ba1e02b495834adb49a25f that should have fixed this issue.


----------------------------------------------------------------
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] plainheart commented on issue #13441: Uncaught TypeError: Cannot set property '0' of undefined

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


   Seems to be related to #12815, and @pissang pushed a commit https://github.com/ecomfe/zrender/commit/94baa6ee141ce3d281ba1e02b495834adb49a25f that should have fixed this issue.


----------------------------------------------------------------
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] clown-helang commented on issue #13441: Uncaught TypeError: Cannot set property '0' of undefined

Posted by GitBox <gi...@apache.org>.
clown-helang commented on issue #13441:
URL: https://github.com/apache/incubator-echarts/issues/13441#issuecomment-711467083


   Will this release 4.9.x minor fix this problem?


----------------------------------------------------------------
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] clown-helang commented on issue #13441: Uncaught TypeError: Cannot set property '0' of undefined

Posted by GitBox <gi...@apache.org>.
clown-helang commented on issue #13441:
URL: https://github.com/apache/incubator-echarts/issues/13441#issuecomment-709975912


   ![1](https://user-images.githubusercontent.com/20653395/96250289-33707b80-0fe1-11eb-87ca-7559d4f86796.gif)
   


----------------------------------------------------------------
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] plainheart commented on issue #13441: Uncaught TypeError: Cannot set property '0' of undefined

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


   I'm afraid no versions will be released anymore in the 4.x branch. The next version will be 5.0 which should be released this month as planned.


----------------------------------------------------------------
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] plainheart edited a comment on issue #13441: Uncaught TypeError: Cannot set property '0' of undefined

Posted by GitBox <gi...@apache.org>.
plainheart edited a comment on issue #13441:
URL: https://github.com/apache/incubator-echarts/issues/13441#issuecomment-711447649


   Thanks for so detailed report. Seems to be related to #12815, and @pissang pushed a commit https://github.com/ecomfe/zrender/commit/94baa6ee141ce3d281ba1e02b495834adb49a25f that should have fixed this issue.


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