Conforms to NSObject
Declared in Series.h

Overview

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

The required methods of the protocol provide the stacked fragments and points within each fragment.

Tasks

Configuring series data source

Instance Methods

allPointsForSeries:

Provides the entire data structure to the series to be used as the data source. Using this method will not automatically generate stacked fragments; they will have to be manually created and their valuePathProperty will have to be set to the property names in the data structure.

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

Parameters

series

Stacked series to assign the data to.

Declared In

Series.h

labelPathForStackedSeries:

Provides means to associate a string property in the data source with labels for categories. This method can be used in conjunction with allPointsForSeries to tell the chart which property to use for labels displayed on the category axis.

- (NSString *)labelPathForStackedSeries:(IGStackedSeriesBase *)series

Parameters

series

Stacked series that will use the labelPath.

Return Value

Returns a string to use for label mapping.

Declared In

Series.h

numberOfFragmentsInSeries:

Asks the data source for the total number of fragments in a stacked series.

- (NSInteger)numberOfFragmentsInSeries:(IGStackedSeriesBase *)series

Parameters

series

The stacked series that will contain the fragments.

Return Value

Returns the total number of fragments in a stacked series.

Declared In

Series.h

numberOfPointsInFragment:forSeries:

Asks the data source for the total number of points in a fragment.

- (NSInteger)numberOfPointsInFragment:(IGStackedFragmentSeries *)fragment forSeries:(IGStackedSeriesBase *)series

Parameters

fragment

The stacked fragment that will contain the points.

series

The stacked series containing the current fragment.

Return Value

Returns the total number of points in a fragment.

Declared In

Series.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

Series.h

objectForDataPoint:inSeries:

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

- (NSObject *)objectForDataPoint:(IGDataPoint *)point inSeries:(IGStackedSeriesBase *)series

Parameters

point

IGDataPoint that represents the original object.

series

Stacked series that holds the data point.

Return Value

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

Declared In

Series.h

series:fragmentAtIndex:

Asks the data source for a stacked fragment to be created at a given index.

- (IGStackedFragmentSeries *)series:(IGStackedSeriesBase *)series fragmentAtIndex:(NSInteger)index

Parameters

series

Stacked series that will contain the new fragment.

index

Index, at which the new fragment will be created.

Return Value

Returns the newly created stacked fragment.

Declared In

Series.h

series:pointAtIndex:forFragment:

Asks the data source for a data point that will be added to the stacked fragment at a given index.

- (IGCategoryPoint *)series:(IGStackedSeriesBase *)series pointAtIndex:(NSInteger)index forFragment:(IGStackedFragmentSeries *)fragment

Parameters

series

Stacked series containing the current fragment.

index

Index, at which a point will be added to the fragment.

fragment

Stacked fragment that will contain the new point.

Return Value

Returns the newly created IGCategoryPoint.

Declared In

Series.h

series:updatePointAtIndex:forFragment:

Looks up a point at a corresponding index and updates its value.

- (IGCategoryPoint *)series:(IGStackedSeriesBase *)series updatePointAtIndex:(NSInteger)index forFragment:(IGStackedFragmentSeries *)fragment

Parameters

series

Stacked series containing the current fragment.

index

Index, at which a point will be updated.

fragment

Stacked fragment that will contain the updated point.

Return Value

Returns the updated IGCategoryPoint.

Declared In

Series.h