This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
A problem that always occurs with chart data labels is that they often overlap, for example, with pie charts having a couple of small slices. Is there any possibility to have a layout algorithm that could deal with this? I know this is not easy to solve, and I haven't seen other graph controls that handle it very well, but I was just wondering. Peter |
|
|
Hello Peter Unfortunately we don't have any layout algorithms for preventing data label overlaps at the moment. This is a feature that I would really like to add, but as you mentioned, it isn't trivial. We don't have any immediate plans for implementing this, I have increased it's priority but can't say when such feature will become available. -Jason |
|
|
Hi Jason, Thanks for putting some priority on this. I have spend a bit of time thinking about it, and did find a paper on the subject (attached), which seems difficult to implement based on the description of their algorithm (so this should not be construed as a recommendation of their method). I have been fiddling with a Canvas subclass that adds an attached property "LabelTarget" that can be set on label elements to identify the element that they refer to. The Arrange method is then overridden to alter the placement of labels so as to minimize a function that scores the label arrangement for having overlapping labels, labels being too far from or too close to their targets, and labels being too close to unrelated elements. It seems not too hard to improve the label placement in simple cases, but a general placement algorithm that is smart enough to do things like move a label to the other side of some obstructed area (such as a cluster of points) is definately quite challenging. If I come up with anything promising I would be glad to share it with you (if you are interested). Peter |
|
|
Hello Peter Thanks for this information. We would love to hear about any discoveries you make while working on this which would help us with implementing this built-in functionality. -Jason |
|