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

Pie chart with line header

3 Answers 76 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.
Megharaj
Top achievements
Rank 1
Megharaj asked on 04 Jan 2016, 12:26 PM

Dear Telerik Team,

 

Please find the image in the attachment, below are the two requests from our end

1. can i show the Pie slice % value and slice name outside pie chart with a line indication similar to image using IOS(swift)

2. is it possible to show the 3D effect on the pie chart similar to image?

 

Thanks

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 04 Jan 2016, 02:06 PM
Hi Megharaj,

Directly to your questions:

1. You can add point labels in pie chart by setting the pointLabelStyle textHidden and textColor properties:
series.style.pointLabelStyle.textHidden = NO;
series.style.pointLabelStyle.textColor = [UIColor redColor];

After that you can customize the point label text by handling chart:labelForDataPoint:property:inSeries:atIndex: method of TKChartDelegate:
- (TKChartPointLabel *)chart:(TKChart *)chart labelForDataPoint:(id<TKChartData>)dataPoint property:(NSString *)propertyName inSeries:(TKChartSeries *)series atIndex:(NSUInteger)dataIndex
{
    TKChartPointLabel *label = [[TKChartPointLabel alloc] initWithPoint:dataPoint series:series text:@"my label text"];
    return label;
}

Finally set the labelDisplayMode property to TKChartPieSeriesLabelDisplayModeOutside to place point labels outside of the chart:
series.labelDisplayMode = TKChartPieSeriesLabelDisplayModeOutside;

Currently TKChart does not support point labels with lines and this should be implemented with code. This feature seems reasonable and I logged it in our feedback portal. Use this link to track its status.

2. Currently TKChart does not support 3d effects. I logged this too in our feedback portal. Here is the link.

I hope this helps. I updated your Telerik points accordingly.

Regards,
Jack
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
0
Enrique
Top achievements
Rank 1
answered on 11 Apr 2016, 09:56 PM
How can I set this properties in C# for same Telerik Xamarin IOS Donut Chart? I mean what method should be handled tho show custom label.
0
Deyan
Telerik team
answered on 14 Apr 2016, 03:23 PM

Hi Enrique,

Normally, properties exposed by the Xamarin Wrapper are with the same names. You can take a look at the Customization article in the online docs regarding point label customization in C#:

http://docs.telerik.com/devtools/ios/Chart/PointLabels/customization

Hope this helps.

Regards,
Deyan
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
Megharaj
Top achievements
Rank 1
Answers by
Jack
Telerik team
Enrique
Top achievements
Rank 1
Deyan
Telerik team
Share this question
or