Pre loader

PieChart label provider

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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.

Version
2.2.1.2260
  • You must to post comments
0
0

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.

  • 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.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies