Closed
Description
Uncaught (in promise) TypeError: Cannot read property 'length' of undefined
at Object.calc (plotly-latest.js:168006)
at calci (plotly-latest.js:148106)
at Object.plots.doCalcdata (plotly-latest.js:148130)
at exports.plot (plotly-latest.js:123908)
at Object.lib.syncOrAsync (plotly-latest.js:119125)
at Object.restyle (plotly-latest.js:125048)
at EventEmitter.<anonymous> (pen.js:69)
at EventEmitter.emit (plotly-latest.js:29592)
at HTMLDivElement.plotObj.emit (plotly-latest.js:117770)
at plotly-latest.js:125052
https://codepen.io/anon/pen/oyZMOG
To trigger this error, on the line chart, first, disable trace A by clicking on it in the legend. Then, on the line chart, disable trace B by clicking on it in the legend. Finally, on the line chart, re-enable trace B by clicking on it in the legend. The shown stack trace is produced in the JavaScript console and trace B is not updated on the histogram. I have found more than one way to trigger this error but this is the most easily reproducible.
Also, after triggering this error, moving the mouse over the histogram throws continuous errors.
Is there a supported way for syncing traces on different charts? This was the best that I could come up with.