SMPieChartView.h



Discussion

NSView subclass that draws a pie chart with title. The pie view works in a very similar fashion to NSTableView, NSOutlineView, and NSBrowser.

A datasource object provides all of the slice data and attributes to display pie chart. A delegate object can respond to some methods for more control over the display and behavior of the pie view.

SMPieChartView Copyright 2002-2008 Snowmint Creative Solutions LLC. http://www.snowmintcs.com/

Constants

NSBackgroundColorAttributeName

NSString *NSBackgroundColorAttributeName;

This is a key to be used in the -pieChartView:attributesForSliceIndex: dictionary. The value represents what color the slice will be drawn. If this key is not present, a default color will be used based on the zero based slice index of the slice.

The value should be an NSColor object. For example, [ NSColor redColor ].


NSForegroundColorAttributeName

NSString *NSForegroundColorAttributeName;

This is a key to be used in the -pieChartView:attributesForSliceIndex: dictionary. The value represents what color the border of the slice will be drawn. If this key is not present, the view's -borderColor will be used.

The value should be an NSColor object. For example, [ NSColor redColor ].


Enumerations

SMLabelPositionEnum

typedef enum _SMLabelPosition {
    SMLabelPositionNone = 0,
    SMLabelPositionBelow = 1,
    SMLabelPositionAbove = 2,
    SMLabelPositionRight = 4,
    SMLabelPositionLeft = 8
} SMLabelPositionEnum;

Constants to use with the -setLabelPosition: and -labelPosition methods.

Constants

NameDescription
SMLabelPositionNoneDraw no labels.
SMLabelPositionBelowDraw the labels below the pie.
SMLabelPositionAboveDraw the labels above the pie.
SMLabelPositionRightDraw the labels to the right of the pie.
SMLabelPositionLeftDraw the labels to the left of the pie.

SMTitlePosition

typedef enum _SMTitlePosition {
    SMTitlePositionBelow = 0,
    SMTitlePositionAbove = 1,
} SMTitlePosition;

Constants to use with the -setTitlePosition: and -titlePosition methods.

Constants

NameDescription
SMTitlePositionBelowDraw the title below the pie.
SMTitlePositionAboveDraw the title above the pie.

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