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

Annotaions for Donut Chart

3 Answers 48 Views
Chart
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ankit
Top achievements
Rank 1
Ankit asked on 14 Apr 2015, 08:34 AM

Hello,

 

I want to know that which annotation can be best viewed on donut chart.

Also how to display the annotation at the point of tap or point of slice of donut chart.

 

Thanks,

Ankit

3 Answers, 1 is accepted

Sort by
0
Adrian
Telerik team
answered on 15 Apr 2015, 10:30 AM
Hi Ankit,

Thank you for contacting us.

The annotations in TKChart are designed to work with cartesian chart and shouldn't be used with pie or donut chart. Instead you should use point labels. To enable point labels for your donut series you should set the textHidden property of TKChartPointLabelStyle to NO. Please consider the code snippet below:
donut.style.pointLabelStyle.textHidden = NO;

If you need to change the text of your label you should implement the chart:textForLabelAtPoint:inSeries:atIndex: method of TKChartDelegate and return the text for the corresponding label:
- (NSString *)chart:(TKChart *)chart textForLabelAtPoint:(id<TKChartData>)dataPoint inSeries:(TKChartSeries *)series atIndex:(NSUInteger)dataIndex
{
    return @"label text";
}

I hope this helps. Should you have further questions do not hesitate to contact us.

Regards,
Adrian
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
0
Enrique
Top achievements
Rank 1
answered on 15 Apr 2016, 11:07 PM
Hi, if I need to change the Label for a Point label when is selected but I have implemented the LabelForDataPoint method. How can I indicate that only show my custom Text but only when is selected-
0
Adrian
Telerik team
answered on 20 Apr 2016, 02:12 PM
Hi, Enrique,

Currently TKChart does not support editing separate point labels. This is already logged in our feedback portal. You can follow the status of the feature request there.

Regards,
Adrian
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Ankit
Top achievements
Rank 1
Answers by
Adrian
Telerik team
Enrique
Top achievements
Rank 1
Share this question
or