Hide overlapping pie labels
If pie labels are long and positioned inside (distance < 0), they overlap. It would be nice to have an option to hide some of the labels.
I understand this is the same problem as finding the maximal independent set in a graph where the nodes are the labels and they're connected if they intersect.
That's an NP-hard problem: http://en.wikipedia.org/wiki/Independent_set_(graph_theory)#Exact_algorithms
It would be nice to have a simple approximation algorithm.
I have been experimenting with this: http://jsfiddle.net/yf2MA/
![](https://secure.gravatar.com/avatar/ba74c0801621ed5e6dc9976002a1737c?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
Here is the same code, written as a plugin so you don't have to attach event listeners to every chart: http://jsfiddle.net/highcharts/Smy56/
-
That's a good approximation, thanks for sharing!