How to get series index in toggleSelectionForPoint


#1

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


#2

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


#3

Perfect! :laughing: