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.
Activity
archmoj commentedon Oct 27, 2019
Could you please share a codepen?
deecay commentedon Oct 27, 2019
https://codepen.io/deecay/pen/wvvexqo
etpinard commentedon Oct 28, 2019
Thanks for reporting @deecay !!
The equivalent sunburst trace behaves better: https://codepen.io/etpinard/pen/mddMOZo
... probably due to this block:
plotly.js/src/traces/sunburst/plot.js
Lines 99 to 101 in 6c3646a
that we could copy over to
treemap/plot.js.