Replies: 3 comments 7 replies
-
|
For now I have this result. I checked documentation, but didn't find out how to setup the places for labels. |
Beta Was this translation helpful? Give feedback.
-
|
The current algorithm for placing the labels doesn't use a grid, but more like around a circle with a radius larger than the pie, and adjusted to avoid labels from overlapping. It might be possible to make the algorithm pluggable so others could implement different methods of laying out the labels. It would need investigation. |
Beta Was this translation helpful? Give feedback.
-
|
It's not possible at this time to adjust the algorithm beyond the It's not straightforward to have a general-purpose algorithm for all possible slice sizes and positions and label geometries. The current algorithm places the labels nominally on a circle with a diameter that is I have seen other pie chart label layout approaches that put all the labels in 2 columns, one on the left side and one on the right side, of the chart area. This is similar to your grid idea but without top/bottom rows. That would probably work reasonably well for the geometry of the labels you are using (I had considered it initially, but preferred the look of the circular layout). In the 2-column approach, it would place labels for slices with a center angle between [0,180) degrees on the right and between [180,360) degrees on the left (where 0 is at the top and angles increase clockwise), then space them vertically so they don't overlap and the connector lines don't cross over the pie. In your example for December, all those labels on the left would stay on the left but be in a column instead of a modified arc. There would still be more labels on the left than on the right because that is how the slices are being drawn. So even with that approach, depending on the data and ordering of the slices you might end up with a tall column of labels on the left and as little as 1 label on the right. Another approach you could try is to order the slices according to their size, largest to smallest, and remove slices (data points) after a certain quantity threshold, say 10 slices, and have a final slice that is "other" that aggregates the values of what you removed. Or, remove slices below a specific value threshold, say 5% or 2%, and aggregate those into an "other" category. Have you tried using a large value of |
Beta Was this translation helpful? Give feedback.





Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to group labels in this way?
It's like a grid with places for labels around chart.
Beta Was this translation helpful? Give feedback.
All reactions