Labels for PieChart

3 posts, 1 answers
  1. Shahir
    Shahir avatar
    2 posts
    Member since:
    Mar 2014

    Posted 17 Mar 2014 Link to this post

    I have started working with the pie charts and I'm happy with the way they look. However, I have been having trouble figuring out how to add labels to a pie chart. I found a class "PieSeriesLabelRenderer" which seems like the answer to my problem, but there are no examples or tutorials on how to use it.

    Any help is appreciated.
  2. Answer
    Todor
    Admin
    Todor avatar
    778 posts

    Posted 18 Mar 2014 Link to this post

    Hi Shahir,

    Thank you for your interest in RadChartView for Android.

    Here's an article that explains how to use the labels in RadChartView. First of all, in order to display them, you need:
    pieSeries.setShowLabels(true);

    Then you can customize the appearance as shown in the Customization section of the article. In addition to the listed methods which are applicable for all types of series, with PieSeries, you can use setLabelOffset(double), which allows you to define the distance between the label and the border line of the pie. PieSeriesLabelRenderer is the renderer that we use by default while drawing labels for the chart, but if it doesn't suit you, you can provide your own LabelRenderer implementation as shown in the example.

    I hope this information helps. Let us know if you have further questions.

    Regards,
    Todor
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. DevCraft banner
  4. Shahir
    Shahir avatar
    2 posts
    Member since:
    Mar 2014

    Posted 18 Mar 2014 in reply to Todor Link to this post

    Thank you for the reply. Very helpful.
Back to Top