This is a migrated thread and some comments may be shown as answers.

Pie chart labels are being cut off

5 Answers 366 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 10 Jan 2014, 06:54 PM
Hi, I often have the problem where pie chart labels are being cut off for certain window sizes. Is there some way for me to intelligently add padding around the chart (or just make the entire chart area smaller such that everything is visible)?

I also have an issue where labels are displayed on top of other labels. I know that there's some smart labeling for linear charts, but I couldn't find the equivalent for pie charts. 

5 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 15 Jan 2014, 10:09 AM
Hello Stephen,

As far as I understand your scenario from the provided picture it seems that the LabelDefinitions property of the PieSeries is set and  some negative margins and custom template are applied. In such scenario it is expected the labels to be trimmed.

Basically, you need to make sure that the space required by the labels is enough and available in your custom window. In your particular case you can try setting the RadiusFactor property of the PieSeries. If you set it to 0.5 the PieChart will occupy 50% of the area that usually will be occupied.

Please give this approach a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Stephen
Top achievements
Rank 1
answered on 15 Jan 2014, 05:21 PM
Hi,

Thank you very much, that does help with the labels being cut off! I've set the RadiusFactor to 0.65 and that works really well.

The only remaining issue I have is that small pie slices tend to have labels that overlap, which makes the text impossible to read (see attached for an example of a census chart). Do you know of an approach I can use to prevent the labels from overlapping? (Also, you are correct in that I'm using a custom template for the labels.)
0
Pavel R. Pavlov
Telerik team
answered on 20 Jan 2014, 01:49 PM
Hello Stephen,

Unfortunately with the current implementation of the RadChartView control there is no way to prevent the labels from overlapping. You can try making the charting component larger so that the labels have enough space or you can use different type of charting component.

However, I am happy to inform you that we already implemented a feature allowing users to generate smart labels in the RadPieChart. They are smart because they are not overlapping one over another. It is similar to the feature demonstrated in this online demo. This feature will be available within our next official release.

Please stay tuned for the release so that you can take advantage of the feature.

Regards,
Pavel R. Pavlov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Stephen
Top achievements
Rank 1
answered on 21 Jan 2014, 09:05 PM
Hi,

Thank you for the information. I'll eagerly be awaiting the next Telerik release!
0
Gamma
Top achievements
Rank 1
answered on 17 Mar 2015, 11:21 AM
Hi Stephen,

For the overlapping issue please try using the below property:

 PieChardID.IntelligentLabelsEnabled = true;

Do this before PieChardID.Series.Add();
Tags
ChartView
Asked by
Stephen
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Stephen
Top achievements
Rank 1
Gamma
Top achievements
Rank 1
Share this question
or