- (NSAttributedString *)attributedTitle;
Returns the attributed title of the pie chart. The default is no title (nil).
Result: An autoreleased string or nil.- (NSColor *)backgroundColor;
Returns the color used to draw the background of the receiver. The default background color is white.
Result: The color used to draw the background.- (NSColor *)borderColor;
Returns the color used to draw the border of each slice. The default color is black.
Result: The color used to draw the border of each slice.- (int)convertToSliceFromPoint:(NSPoint)inPoint fromView:(NSView *)inView;
Converts a point from a given window/view coordinate system to a slice of the pie, or
-1 if the click was not on a slice of the pie.
For example, if there are two slices of the pie (left half and right half) and the
user clicks on the left half, this would return 0.
This is very useful when called from the -pieChartView:didClickPoint: delegate method.
Result: The slice of the pie that was clicked on. If the point is not on a slice of pie, returns -1.
Name Description inPoint The point to be converted. inView The inPoint parameter is in this view's coordinate system. A value of nil means the window's coordinate system.
- (id)dataSource;
Returns the object that slice data is pulled from.
Result: The data source object of the pie view.- (id)delegate;
Returns the delegate object for the pie view.
Result: The delegate object.- (float)explodeDistance;
Returns the pixel offset from the center of the chart to draw exploded slices of the pie. The default is zero.
Result: The number of pixels to offset exploded parts of the pie.- (NSImage *)imageOfView;
Returns an autoreleased image of the entire chart view. This image is filled with a white background first, so it should not have any transparent parts.
Result: An NSImage object of the entire chart view.- (SMLabelPositionEnum)labelPosition;
Returns the position of labels for the pie chart. The default is no labels.
Result: The position of labels.- (IBAction)refreshDisplay:(id)sender;
Simple cover method that calls -reloadData, then -reloadAttributes.
Name Description sender Any object or nil; unused.
- (void)reloadAttributes;
Reloads all slice attributes from the datasource and schedules the chart for redrawing. The slice data is not reloaded.
- (void)reloadAttributesForSliceIndex:(unsigned int)inSliceIndex;
Reloads a specific slice's attributes from the datasource and schedules the chart for redrawing. The slice data is not reloaded.
Name Description inSliceIndex The zero based index of the slice to reload.
- (void)reloadData;
Reloads all slice data from the datasource and schedules the chart for redrawing.
- (void)setAttributedTitle:(NSAttributedString *)inNewTitle;
Sets the attributed title of the pie chart. The default is no title (nil).
Name Description inNewTitle The new title. If nil, any existing title is removed.
- (void)setBackgroundColor:(NSColor *)inColor;
Sets the receiver's background color to aColor. The default is white. If set to nil, no
background is drawn.
See Also: -setDrawsGrid:, -drawsGrid, -setGridColor:, -gridColor, and -backgroundColor.
Name Description inColor The new background color.
- (void)setBorderColor:(NSColor *)inColor;
Sets the color used to draw the border of each slice. The default color is black.
See Also: -setBackgroundColor:, and -backgroundColor.
Name Description inColor The color to draw the border of each slice.
- (void)setDataSource:(id)inDataSource;
Set the object that slice data is pulled from. This works in exactly the same way that
NSTableView and NSOutlineView have data source objects.
The data source is checked to see if responds to methods in the SMPieChartDataSource category.
Name Description inDataSource The new data source.
- (void)setDelegate:(id)inDelegate;
Set the delegate object for the pie view.
The delegate is checked to see if responds to any of the methods in the SMPieChartDelegate category.
Name Description inDelegate The new delegate object.
- (void)setExplodeDistance:(float)inDistance;
Sets the pixel offset from the center of the chart to draw exploded slices of the pie. The default is zero.
Name Description inDistance The number of pixels to offset exploded parts of the pie.
- (void)setLabelPosition:(SMLabelPositionEnum)inNewValue;
Sets the position of labels for the pie chart. The default is no labels.
Name Description inNewValue The new label position value.
- (void)setTag:(int)inTag;
Sets the tag of the receiver to inTag. This is an integer you can use for whatever you'd like.
Name Description inTag The new tag of the receiver.
- (void)setTitle:(NSString *)inNewTitle;
Sets the title of the pie chart. The default is no title (nil).
Name Description inNewTitle The new title. If nil, any existing title is removed.
- (void)setTitlePosition:(SMTitlePosition)inPosition;
Sets the position of the title. The default is SMTitlePositionBelow.
Name Description inPosition The position to draw the title in.
- (int)tag;
Returns the tag of the receiver. This is an integer you can use for whatever you'd like.
Result: The tag of the receiver.- (NSString *)title;
Returns the title of the pie chart. The default is no title (nil).
Result: An autoreleased string or nil.- (SMTitlePosition)titlePosition;
Returns the position of the title. The default is SMTitlePositionBelow.
Result: The number of position to draw the title in.© 2003-2004 Snowmint Creative Solutions LLC (Last Updated 8/29/2004)