- (unsigned int)numberOfLinesInTwoDGraphView:(SM2DGraphView *)inGraphView;
Asks the datasource to report the number of data lines to be drawn in a particular graph view.
Result: Should return the number of data lines to graph.
Name Description inGraphView The graph view making the call.
- (NSDictionary *)twoDGraphView:(SM2DGraphView *)inGraphView attributesForLineIndex:(unsigned int)inLineIndex;
Implementing this method is optional. Asks the datasource for the drawing attributes to use when drawing a particular line. If the datasource does not respond to this message, or returns nil, default values are used. See the constants section of the documentation for keys that can be used.
Result: A dictionary of attributes to use to draw the line; can return nil if default values are wanted.
Name Description inGraphView The graph view making the call. inLineIndex The zero based data line index to return.
- (NSArray *)twoDGraphView:(SM2DGraphView *)inGraphView dataForLineIndex:(unsigned int)inLineIndex;
Either this method or -twoDGraphView:dataObjectForLineIndex: must be implemented. You can
implement one or the other, or both if you want a mix of data types.
Asks the datasource to report the actual data points for a particular line. The points should
be returned as an NSArray of NSPoints as strings; you can use the function NSStringFromPoint
to do the conversion.
Result: An NSArray (or NSMutableArray) of NSPoints as strings. Can be nil if no points are on this line.
Name Description inGraphView The graph view making the call. inLineIndex The zero based data line index to return.
- (NSData *)twoDGraphView:(SM2DGraphView *)inGraphView dataObjectForLineIndex:(unsigned int)inLineIndex;
Either this method or -twoDGraphView:dataForLineIndex: must be implemented. You can implement one
or the other, or both if you want a mix of data types.
This method asks the datasource to report the actual data points for a particular line.
The points should be returned as an NSData containing an array of NSPoints
(or CGPoints since they're the same thing). The length of the NSData object should be an exact multiple
of sizeof(NSPoint).
Result: An NSData (or NSMutableData) of NSPoints (or CGPoints). Can be nil if no points are on this line.
Name Description inGraphView The graph view making the call. inLineIndex The zero based data line index to return.
- (double)twoDGraphView:(SM2DGraphView *)inGraphView maximumValueForLineIndex:(unsigned int)inLineIndex
forAxis:(SM2DGraphAxisEnum)inAxis;
Asks the datasource to report the maximum axis value to use for a particular line. For example, if
your line data points y value ranges from 1 to 9, you may want to graph from 0 to 10; in that case,
you would return 10 as a maximum.
This sets the scale to be used to display the line.
Result: A number to use for the maximum value of the scale.
Name Description inGraphView The graph view making the call. inLineIndex The zero based data line index to return. inAxis The axis requested.
- (double)twoDGraphView:(SM2DGraphView *)inGraphView minimumValueForLineIndex:(unsigned int)inLineIndex
forAxis:(SM2DGraphAxisEnum)inAxis;
Asks the datasource to report the minimum axis value to use for a particular line. For example, if
your line data points y value ranges from 1 to 9, you may want to graph from 0 to 10; in that case,
you would return 0 as a minimum.
This sets the scale to be used to display the line.
Result: A number to use for the minimum value of the scale.
Name Description inGraphView The graph view making the call. inLineIndex The zero based data line index to return. inAxis The axis requested.
© 2003 Snowmint Creative Solutions LLC (Last Updated 9/4/2003)