Closed
Description
A call to relayout using object relayout syntax that looks something like:
layoutUpdate = {"xaxis2.domain[1]":0.7575000000000001,"xaxis3":
{"anchor":"y2","domain":[0.7925,0.95]}}
Plotly.relayout(graphDiv, layoutUpdate)
will throw
uncaught TypeError: Cannot read property 'type' of undefined
at convertCoords (convert_coords.js:30)
at _relayout (plot_api.js:1975)
at Object.relayout (plot_api.js:1721)
at HTMLAnchorElement.<anonymous> (index.js:3580)
at HTMLAnchorElement.dispatch (toolpanel-dependencies-bundle.js:2003)
at HTMLAnchorElement.u (toolpanel-dependencies-bundle.js:1927)
when called on a normal single axis plot.
It appears to be thrown in the relayout code during some Annotation coord call. Perhaps because xaxis2 doesn't exist?
Note that using plotly.js's infamous dot syntax
layoutUpdate = {"xaxis2.anchor":"y2","xaxis2.domain":[0.6,0.95],"yaxis2.anchor":"x2","yaxis2.domain":[0.6,0.95]}
Plotly.relayout(graphDiv, layoutUpdate)
seems to work correctly.
I am updating code that uses object syntax to use dot notation as a workaround.
This one is probably for @alexcjohnson :)