-
-
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
Pie charts don't always seem to fit labels to a constrained space #75
Comments
We certainly could check for labels going off the edge of the plot, and shrink them to fit, that probably wouldn't be very hard. The problem gets worse if you have several pies, their respective labels do nothing to avoid each other. That seems like a harder one to fix... |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Merged
Related #3607 |
Merging into (updated) #4223 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Maybe it's just me, but I keep ending up with pie chart labels that look like this: http://codepen.io/tlrdstd/pen/QyWybK
It happens when I assign a fixed size to the pie chart, either by passing it in the
layout
hash, or instyle
attributes on the div. The pie chart always grows to fit the space, regardless of whether there is room to fit the labels. With a 300x300 square in this example, both the title and the text are cut off. If I increase to a 500x500 square, the title fits, but the text is still cut off because the pie chart grows to match.Converting the square to a rectangle solves the problem, but that doesn't fit my design space.
I haven't dug into this in the code yet...after trying to solve variations on the same problem in other libraries (flot, d3pie, and uvcharts come to mind), I'm just assuming it ain't easy. d3pie does the best job of plotting labels of anything I've seen, though it too forgets to check the edges of the box.
The text was updated successfully, but these errors were encountered: