Conforms to NSObject
Declared in Series.h

Overview

The IGSeriesDataSource protocol is adopted by an object that mediates the application’s data model for an IGSeries object. The data source provides the series object with the information it needs to construct and modify a chart view.

The required methods of the protocol provide the points to be displayed by the chart view along with the total number of points in the series. There are also optional methods for creating point tooltips.

Tasks

Instance Methods

allPointsForSeries:

Askds the data source for all IGDataPoint objects.

- (NSArray *)allPointsForSeries:(IGSeries *)series

Parameters

series

Series requesting the information.

Return Value

Returns an array of IGDataPoint objects.

Discussion

This method should only be implemented if your data is already in the IGDataPoint format. Otherwise you should covert your data point by point using the series:pointAtIndex: method.

Declared In

Series.h

numberOfPointsInSeries:

Asks the data source for the total number of points in the series.

- (int)numberOfPointsInSeries:(IGSeries *)series

Parameters

series

Series requesting the information.

Return Value

Returns the number of points in the series.

Declared In

Series.h

series:pointAtIndex:

Asks the data source for an IGDataPoint to be placed at a given location.

- (IGDataPoint *)series:(IGSeries *)series pointAtIndex:(int)index

Parameters

series

Series requesting the information.

index

Index of the created data point.

Return Value

Returns an object inheriting IGDataPoint that will be used by the series.

Declared In

Series.h

series:tooltipForPointAt:

Asks the data source for a tooltip that will be used for a point at a specified index.

- (UIView *)series:(IGSeries *)series tooltipForPointAt:(int)index

Parameters

series

Series requesting the information.

index

Index of the data point, to which the tooltip will be assigned.

Return Value

Returns a view that will be used as a tooltip.

Declared In

Series.h

series:updatePointAtIndex:

- (IGDataPoint *)series:(IGSeries *)series updatePointAtIndex:(int)index