Inherits from NSObject
Conforms to IGSparklineViewDataSource
Declared in IGSparklineView.h

Overview

This data source helper is used to create a data source for the pie chart. The data source helper provides a simplified way of supplying data for the pie chart. The resulting data structure contains multiple IGCategoryPoint instances.

Tasks

Other Methods

  •   data

    An array of custom data objects. The fields in the data object are accessed via memberPath properties.

    property
  •   labels

    An array of string labels used to create data points.

    property
  •   labelPath

    Name of the property containing labels.

    property
  •   values

    A numeric array of values used to create data points.

    property
  •   valuePath

    A string value path that specifies the property in the data source used for values.

    property

Initializing DataSource Helper

Properties

data

An array of custom data objects. The fields in the data object are accessed via memberPath properties.

@property (nonatomic, retain) NSArray *data

Declared In

IGSparklineView.h

labelPath

Name of the property containing labels.

@property (nonatomic, retain) NSString *labelPath

Declared In

IGSparklineView.h

labels

An array of string labels used to create data points.

@property (nonatomic, retain) NSArray *labels

Declared In

IGSparklineView.h

valuePath

A string value path that specifies the property in the data source used for values.

@property (nonatomic, retain) NSString *valuePath

Declared In

IGSparklineView.h

values

A numeric array of values used to create data points.

@property (nonatomic, retain) NSArray *values

Declared In

IGSparklineView.h

Instance Methods

initWithData:valuePath:

Initializes the data source with an array of custom data objects.

- (id)initWithData:(NSArray *)data valuePath:(NSString *)valuePath

Parameters

data

Array of custom objects.

valuePath

The name of the property containing values.

Return Value

Returns an initialized data source.

Declared In

IGSparklineView.h

initWithData:valuePath:labelPath:

Initializes the data source with an array of custom data objects.

- (id)initWithData:(NSArray *)data valuePath:(NSString *)valuePath labelPath:(NSString *)labelPath

Parameters

data

Array of custom objects.

valuePath

The name of the property containing values.

labelPath

The name of the property containing labels.

Return Value

Returns an initialized data source.

Declared In

IGSparklineView.h

initWithValues:

Initializes the data source with an array of numeric values.

- (id)initWithValues:(NSArray *)values

Parameters

values

Array of numeric values.

Return Value

Returns an initialized data source.

Declared In

IGSparklineView.h

initWithValues:labels:

Initializes the data source with an array of numeric values and string labels.

- (id)initWithValues:(NSArray *)values labels:(NSArray *)labels

Parameters

values

Array of numeric values.

labels

Array of string labels.

Return Value

Returns an initialized data source.

Declared In

IGSparklineView.h