Is there a way to provide custom text for the labels in a PieChartSegment? I want to format the text, but haven’t been able to find a label formatter for the pie charts.
- Mobile Developers asked 5 years ago
- You must login to post comments
Hi There,
To do that, you will need to override PieSeries and override the getLabelTextForSegment method. Please see the code below:
class CustomPieSeries: SCIPieRenderableSeries {
override func getLabelText(for segment: SCIPieSegment!, totalValue value: Double) -> String! {
// Format your values here
return "CUSTOM STRING HERE"
}
}
Hope that helps.
Best Regards,
Nazar.
- Nazar Rudnyk answered 5 years ago
- last edited 5 years ago
-
Is there also a way to place attributed text? or get access to the actual label?
-
Those are not labels, and unfortunately that’s not supported for pie\donut chart. Best Regards, Nazar R.
- You must login to post comments
Please login first to submit.