IGPieChartViewDataSource Protocol Reference

Conforms to NSObject
Declared in IGPieChartView.h

Overview

IGPieChartViewDataSource protocol represents the data model object used by the pie chart. It provides the means to supply the pie chart with data. This protocol can be implemented by the user to provide full control over the data that goes into the pie chart. Alternatively, IGPieChartViewDataSourceHelper can be used to simply that process.

– numberOfPointsInPieChartView: required method

This method specifies the number of data items in the pie chart.

- (NSInteger)numberOfPointsInPieChartView:(IGPieChartView *)pieChartView

Parameters

pieChartView

Reference to the pie chart.

Return Value

Returns the number of data items in the pie chart.

Declared In

IGPieChartView.h

– pieChartView:pointAtIndex: required method

This method supplies an IGDataPoint reference to the pie chart at a given index.

- (IGDataPoint *)pieChartView:(IGPieChartView *)pieChartView pointAtIndex:(NSInteger)index

Parameters

pieChartView

Reference to the pie chart.

index

The current index.

Return Value

Returns an initialized IGDataPoint to be used by the pie chart.

Declared In

IGPieChartView.h

– allPointsForSeries:

This method can be used to supply the pie chart with a range of data points. If this method is implemented the datasource will not respond to numberOfPointsInPieChartView or pointAtIndex.

- (NSArray *)allPointsForSeries:(IGPieChartView *)pieChartView

Parameters

pieChartView

Reference to the pie chart.

Return Value

Returns a range of initialized points.

Declared In

IGPieChartView.h

– objectAtIndex:

Returns the original data object at a specified index.

- (NSObject *)objectAtIndex:(NSInteger)index

Parameters

index

Index of the data object to be returned.

Return Value

Returns the data object at a specified index.

Declared In

IGPieChartView.h

– objectForDataPoint:inPieChartView:

Returns the original data object based on its corresponding data point.

- (NSObject *)objectForDataPoint:(IGDataPoint *)point inPieChartView:(IGPieChartView *)pieChartview

Parameters

point

IGDataPoint that represents the original object.

pieChartview

Reference to the pie chart.

Return Value

Returns the data object that corresponds to the given data point.

Declared In

IGPieChartView.h