Pre loader

Android how to add Data from a Arraylist to PieChart

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

Hello,

I get data from reading an URL so I save them (prepared) to a Arraylist (type PieSegment). How can I add the PieSegments from the Arraylist with (for example a loop) to my Piechart?

BR and thank you very much.
Marco

Version
4.0.0.4449
  • You must to post comments
0
0

Hi Marco,

This can be done using next code:

    final PieRenderableSeries pieSeries = sciChartBuilder.newPieSeries().build();

    final ArrayList<PieSegment> pieSegments = ...;

    pieSeries.getSegmentsCollection().addAll(pieSegments);

Best regards,
Yura

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.