Hi Team,
I am using the XamDoughnut chart control and in the ring series, for the LabelsPosition I use BestFit option.
In the attached image You can see how it is the behaviour of the labels, sometimes it isn't visible the hole label, if it is outside, it is truncated. What I noticed with SNOOP, that the slice path Width and Height is much more bigger and covers the label.
This issue it can be reproduce also on the XamPieChartControl
Somehow can we resolve this problem, to see every time the entire label text?
Hello dvsegmbh,
The issue is that the XamDoughnutChart doesn't have enough space around it to fit the labels. This is the expected behavior. Try adjusting the RingSeries.RadiusFactor property. You can use this to shrink down the size of the ring, giving more space between the ring and the control boundaries. It might also be a good idea to provide a MinWidth and MinHeight to the chart so that it is not allowed to get too small.
Hi Rob,
Can I find from somewhere if the label is cut off, and if yes to put the label collapsed?
Hi dvsegmbh,
It's possible, but there's no built-in way to do this.
Looking around I found this stackoverflow post which has code you can use to determine if text is being trimmed. I used this as a basis to implement label hiding if the text was cut off. Now, hiding the label does not hide the line that is attached to it so I had to write another attached property that would control the line visibility. Take a look at my attached sample. You can see the implementation in action if you run the sample and manually resize the window so that the labels move around.
Thank you for the example, I will verify the solution.
Does this solution resolve your issue?
Let me know if you have any further questions on this matter.
He Rob,
We have resolved our problem. Thank you!