-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix resizing pie
like traces when textinfo
is set to "none"
#6893
Conversation
I was not able able to replicate the bug on this codepen. |
@archmoj as I described in the repro repo, you have to mouseover the plot first, then attempt to resize. |
I do not have permission to reopen this pull request |
Thanks very much for clear bug report. 🙏 |
pie
like traces when textinfo
is set to "none"
Thanks very much for this PR. |
If
textinfo==="none"
, thetextposition
coercion is skipped for both funnelarea and pie traces. However, there is a place in the plot render logic that assumestextposition
is defined and is skipped ifftextposition==="none"
(https://github.com/plotly/plotly.js/blob/master/src/traces/pie/plot.js#L136).Since the coercion is not enforced and
textposition
is undefined (not"none"
), related text objects which have not been initialized are attempted to be accessed resulting in a null pointer exception (https://github.com/plotly/plotly.js/blob/master/src/traces/pie/plot.js#L511).I am open to alternative solutions that may include a
textinfo==="none"
check in the plot render logic, but this approach seemed to be the most comprehensive.Reproduction example: https://github.com/robbtraister/plotly-npe