Hi,
When given data for treemap is somehow flawed, Plotly terminates with error. I think there needs to be some error handling.
In my case, plotting stops here with Cannot read property 'data' of undefined.
https://github.com/plotly/plotly.js/blob/990a96050bbab12e1e405d0974985b2fea54d2e6/src/traces/treemap/plot.js#L87
This is because calc has failed to build cd.hierarchy, but plotOne expects hierarchy to be there.
Since treemap doesn't have axis, I don't know what a blank treemap plot would look like, but I suppose that's waht we need here.
Could you please share a codepen?
Thanks for reporting @deecay !!
The equivalent sunburst trace behaves better: https://codepen.io/etpinard/pen/mddMOZo
... probably due to this block:
that we could copy over to treemap/plot.js.