SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components


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.

  • You must 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,

  • Mobile Developers
    Is there also a way to place attributed text? or get access to the actual label?
  • Nazar Rudnyk
    Those are not labels, and unfortunately that’s not supported for pie\donut chart. Best Regards, Nazar R.
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.