New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Cannot read property '0' of undefined" error when stacked column chart is resized #4558
Comments
Workarounds:
Internal note: |
What about using the x value plus som indicator in case the of multiple stacked points? So if the x value for that series has been taken before, we add 1,2,3,4 etc? It's just a thought, I don't know if it works well... |
Let me know what do you think. I will write a test for that case if this is fine. |
Solution above is more generic - we can revert #4557 commit, unless you think this is a good idea to rebuild stacks after modifying points array. We don't need to do that, but it will release a bit of memory (since some of stacks will disappear when are created inside the break). However, we would need to rebuild stacks so it would require extra CPU (a bit, but still!) ;) |
Yes, it's probably better to revert the #4557 commit to save CPU.
It seems like a robust solution. Maybe there's room for micro optimization, like constructing the empty stackIndicator, and generating the key? |
Done in this commit and this one. I wasn't sure about generating the key so it's split in two commits, in case of reverting. Thanks! |
Excellent, thanks! I pulled the fix and the optimizations and reverted the 4557 fix. |
I still see a similar problem when using highstock with stacked bar chart and scroll bar enabled, which has 100 categories. |
Hi @shashivardhan - it's a bug in categorized axis, setting |
For a stacked column chart which is periodically updated, when the browser window is resized horizontally and the chart tries to change its width accordingly, a "Cannot read property '0' of undefined" error happens frequently.
In addition, when this happens, the points newly added to the second series start to appear on the column left to the last column, instead of the last column.
Demo: http://jsfiddle.net/peter_scarab/LLExL/5171/
Browser: Chrome 44
Tried with both the current master and bugfix branches.
The text was updated successfully, but these errors were encountered: