In my Shinobi Pie Chart, I want to change the display of the label when a slice is selected.
I believe that this is the method that gets called when a slice is selected, but I don't see how to manipulate the label that is associated with that data point from within this method:
- (void)sChart:(ShinobiChart *)chart
toggledSelectionForRadialPoint:(SChartRadialDataPoint *)dataPoint
inSeries:(SChartRadialSeries *)series
atPixelCoordinate:(CGPoint)pixelPoint {
// What would I put here to get a reference to the label for the given dataPoint?
}
None of the objects I have access to in the method seem to have a way to get the labels, but there must be a way.
Implement the method sChart:alterLabel:forDatapoint:atSliceIndex:inRadialSeries:
in your delegate. This is called as each slice label is laid out. It's also called after a selection event, meaning it should be suitable for altering the labels on selection. However, you won't know if the slice was selected or not - just that it is being redrawn.
If you do need to know whether it is being selected or not, you could always keep track of which data points have been selected via your sChart:toggledSelectionForRadialPoint:.. method.