Pie chart labels are being cut off

6 posts, 0 answers
  1. Stephen
    Stephen avatar
    12 posts
    Member since:
    Sep 2013

    Posted 10 Jan 2014 Link to this post

    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. 
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 15 Jan 2014 Link to this post

    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 >>
  3. DevCraft banner
  4. Stephen
    Stephen avatar
    12 posts
    Member since:
    Sep 2013

    Posted 15 Jan 2014 Link to this post

    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.)
  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1183 posts

    Posted 20 Jan 2014 Link to this post

    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 >>
  6. Stephen
    Stephen avatar
    12 posts
    Member since:
    Sep 2013

    Posted 21 Jan 2014 Link to this post

    Hi,

    Thank you for the information. I'll eagerly be awaiting the next Telerik release!
  7. Gamma
    Gamma avatar
    1 posts
    Member since:
    Sep 2012

    Posted 17 Mar 2015 in reply to Stephen Link to this post

    Hi Stephen,

    For the overlapping issue please try using the below property:

     PieChardID.IntelligentLabelsEnabled = true;

    Do this before PieChardID.Series.Add();
Back to Top
DevCraft banner