How to get series index in toggleSelectionForPoint


Hi experts,

How can I get series index in toggleSelectionForPoint?

- (void)sChart:(ShinobiChart *)chart toggledSelectionForPoint:(SChartDataPoint *)dataPoint inSeries:(SChartSeries *)series
atPixelCoordinate:(CGPoint)pixelPoint {
    NSLog(@"dataPoint.index = %d", dataPoint.index);
    NSLog(@"series index = %@", ???);

Thank you,

Binh Nguyen


Hi Binh,

Thanks for getting in touch!

The following code should enable you to print out the series index:

[chart.series indexOfObject:series]

Let me know if you have any questions.

Kind Regards,
Andrew Polkinghorn


Perfect! :laughing: