You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I shrink-resize a responsive, automargin Plotly Horizontal Bar Chart to a greater extent quickly (e.g. drag browser window to minimum size or press minimize button, if it was previously shrinked like this), I receive following error:
Chrome:
Firefox:
The graph is made responsive by the following config:
Currently I am using Plotly Charts in a CSS grid layout, wrapped by React (plain plotly.js-basic-dist, no react-plotly.js).
After some research, I encountered this forum thread from Jun '17, in which the solution is basically to ignore the error, because it does not have functional impact.
However, using an React Error Boundary Handler, that error completely shut down my whole application every time it occured. It did cost me 2-3 hours of debugging time to roughly determine where the error did come from, as the message is not very intuitive.
I would really appreciate to have a fix, that does not include workarounds like manually implement a resize handler or similar, because I like the simplicity of responsive:true
The text was updated successfully, but these errors were encountered:
Thank you @Ford04 for clearly reporting this issue!
There is indeed a problem with the automargin routine upon resize. The issue isn't with responsive: true itself: resizing the figure with Plotly.relayout will also return an error. This can be seen in this Codepen (without React) https://codepen.io/antoinerg/full/bZwGwK
antoinerg
changed the title
Resized responsive automargin BarChart results in "Cannot read property 'val' of undefined"
Resizing automargin BarChart results in "Cannot read property 'val' of undefined"
Mar 4, 2019
Codesandbox: https://codesandbox.io/s/r3k874mr4 , in own window to resize better: https://r3k874mr4.codesandbox.io/
plotly.js-basic-dist: 1.45.0
If I shrink-resize a responsive, automargin Plotly Horizontal Bar Chart to a greater extent quickly (e.g. drag browser window to minimum size or press minimize button, if it was previously shrinked like this), I receive following error:
Chrome:

Firefox:

The graph is made responsive by the following config:
Currently I am using Plotly Charts in a CSS grid layout, wrapped by React (plain
plotly.js-basic-dist
, noreact-plotly.js
).After some research, I encountered this forum thread from Jun '17, in which the solution is basically to ignore the error, because it does not have functional impact.
However, using an React Error Boundary Handler, that error completely shut down my whole application every time it occured. It did cost me 2-3 hours of debugging time to roughly determine where the error did come from, as the message is not very intuitive.
I would really appreciate to have a fix, that does not include workarounds like manually implement a resize handler or similar, because I like the simplicity of
responsive:true
The text was updated successfully, but these errors were encountered: