Skip to content
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

Pie chart label / legend overlap #4222

Closed
nicolaskruchten opened this issue Sep 26, 2019 · 8 comments
Closed

Pie chart label / legend overlap #4222

nicolaskruchten opened this issue Sep 26, 2019 · 8 comments
Labels
feature something new

Comments

@nicolaskruchten
Copy link
Contributor

This should not happen:

image

@etpinard etpinard added the feature something new label Sep 26, 2019
@etpinard
Copy link
Contributor

Related: #1199

@nicolaskruchten

This comment has been minimized.

@etpinard
Copy link
Contributor

What are the requirements here?

  • Just fixing the pie labels <--> legend overlaps?
  • OR fix all overlaps in components (e.g. colorbars, cartesian axis labels, updatemenus, sliders, range sliders/selectors) that can be drawn in the margins?

@nicolaskruchten
Copy link
Contributor Author

This issue covers pie stuff, and #1199 covers Cartesian axis labels, so those two at minimum. Rangesliders and colorbars would be nice to have also but if you want to break those out to a separate issue that’s ok.

@etpinard etpinard self-assigned this Nov 22, 2019
@etpinard
Copy link
Contributor

etpinard commented Jan 6, 2020

Moved to 1.53.0

@etpinard etpinard modified the milestones: v1.52.0, v1.53.0 Jan 6, 2020
@nicolaskruchten nicolaskruchten modified the milestones: v1.53.0, v1.54.0 Jan 30, 2020
@etpinard etpinard removed their assignment Mar 12, 2020
@etpinard
Copy link
Contributor

In order to do this, Plots.doAutoMargin will have to be modified so that the certain margin push values (setup by the components via Plots.autoMargin) can be "added on top of one another" instead of simply pushing to the max top, bottom, left, right values.

For example, currently if the pie labels have {val: 1, size: 20} and the legend has {val: 1, size: 40}, the margin will be pushed to 40. To resolve this issue, we'll need to the updated margin to have at least 60px (plus probably some padding). Next, we'll need to redraw the legend in a new position beyond the pie labels (this also might be tricky w/o mutating legend.x) . Doing the same for cartesian axis labels should get us close to resolving #1199.

A tricky question comes in when we start to add the other push-margin components into the mix (see #2704 (comment) for a complete list). What should we do when e.g. a colorbar overlaps the legend? Perhaps, we should be consistent and always make the legend move to the outside, but the might not be what people expect. Maybe we should spend time designing a more thorough "auto-position" algorithm for all "free" components: legend, colorbars, sliders, updatemenus and rangeselectors.

@nicolaskruchten nicolaskruchten modified the milestones: v1.54.0, v1.55.0 Mar 15, 2020
@rehanguha
Copy link

Is there any temporary quick fix for this problem?

@gvwilson
Copy link
Contributor

Hi - we are currently trying to tidy up Plotly's public repositories to help us focus our efforts on things that will help users most. Since this issue has been sitting for several years, I'm going to close it. If it's still a concern, we'd be grateful if you could open a new issue (with a short reproducible example if appropriate) so that we can add it to our backlog. Thanks for your help - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

No branches or pull requests

4 participants