How to change pie chart datas according to selected serie?



I need to display a pie chart that would display market share by mobility (Desktop or Mobile).
If the user selects a value, then the graph is reloaded with datas corresponding to the selection (Windows, Mac, Linux for Desktop; iOS, Android, Windows Phone for Mobile).

I have defined a delegate to handle the selection, but how should my series be?

Thanks for your help.
Best regards,


Hi SuperAllumette,

You can use your charts SChartDatasource class to control what data is shown on your chart.

So when a section of your chart is selected you can inform your charts datasource of what has been selected and implement your charts datasource methods to return the correct values for when each section has been selected. Then you call the ShinobiChart method “reloadData” to make your chart load the new data using the methods you’ve implemented. 

Also there is a PieChart demo app that’s attached to the trial download which simulates similar behaviour if you want to see some sample code.

Kind Regards,
Andrew Polkinghorn



We started from this sample. So we have indeed a SChartDataSource that we “tinker” to display some data and change them with a delegate. We was wondering if this was the way to do it. And when we call reloadData to refresh the graph with the new datas, sometimes legends from the precedent series are still displayed.
Besides I’ve launched PieChartSample again to check, it only displays two charts from a datasource with only one serie so this is not what we intend to do.

Anyway, my company has chosen another library due to the lack of support from this one.

Best regards.