NSObject(SMPieChartDelegate)



Discussion

An object can implement any of the optional methods in this category to gain greater control over a particular chart view.

Methods

pieChartView:didClickPoint:

- (void)pieChartView:(SMPieChartView *)inPieChartView didClickPoint:(NSPoint)inPoint; 

Implementing this method is optional. The delegate has a chance to respond to the user clicking the mouse in the area of the view.

You may want to use -convertToSliceFromPoint:fromView: to get the slice of the pie the user clicked on.

Parameters

NameDescription
inPieChartViewThe pie view making the call.
inPointThe clicked position in the pie view coordinate system.

pieChartView:labelForSliceIndex:

- (NSString *)pieChartView:(SMPieChartView *)inPieChartView labelForSliceIndex:(unsigned int)inSliceIndex; 

Implementing this method is optional. The delegate has a chance to change the slice labels drawn for each part of the graph. If the delegate does not respond to this message no label is drawn.

Parameters

NameDescription
inPieChartViewThe pie view making the call.
inSliceIndexThe zero based slice index to return.
Result: A string to draw for the slice; can return nil if no label is wanted.

pieChartViewCompletedDrawing:

- (void)pieChartViewCompletedDrawing:(SMPieChartView *)inPieChartView; 

Implementing this method is optional. The delegate can be notified when the view completes drawing. This is called at the end of the -drawRect: method of the view. This could be useful for a progress bar or timing information.

Parameters

NameDescription
inPieChartViewThe pie view making the call.

© 2002-2009 Snowmint Creative Solutions LLC (Last Updated 4/13/2009)