✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Missing trace properties and text transform properties broke pie chart

Hi, I got a weird case when I re-render a pie chart (enlarge a pie chart to a different div container) and some pie slices don’t re-size correctly. It happens whenever the length of sliceTextGroup is > 0 after sliceTextGroup.exit().remove() is called within the plotly.js library. Does anyone encounter this issue?

Could you please share a reproducible codepen?

Hi, unfortunately our application has a very complicated UI so it’s very hard to reproduce using codepen. I am wondering if some checks should be added to prevent undefined property values, especially when the code sliceTextGroup.exit().remove() fails. For this particular error, the following properties were undefined and caused errors:
trace.insidetextfont (within determineInsideTextFont function)
trace.insidetextfont.color (within determineInsideTextFont function)
trace.insidetextfont.family (within determineInsideTextFont function)
trace.insidetextfont.size (within determineInsideTextFont function)
transform.textPosAngle (within plot function)