OCKGroupedBarChartViewDataSource Protocol Reference

Conforms to NSObject
Declared in OCKGroupedBarChartView.h

The data source provides the information for a OCKGroupedBarChartView object to draw a group bar chart.

– numberOfDataSeriesInChartView: required method

Number of data series in this chart. Bars in a same data series share same metrics, color, and legend. The minimum value is 1.

- (NSInteger)numberOfDataSeriesInChartView:(OCKGroupedBarChartView *)chartView

Parameters

chartView

An object representing the chart view requesting this information.

Return Value

Number of data series.

Declared In

OCKGroupedBarChartView.h

– numberOfCategoriesPerDataSeriesInChartView: required method

Number of categories in this chart. Bars in a same category are displayed in a same group. Each data series should have same number of categories. The minimum value is 1.

- (NSInteger)numberOfCategoriesPerDataSeriesInChartView:(OCKGroupedBarChartView *)chartView

Parameters

chartView

An object representing the chart view requesting this information.

Return Value

Number of categories.

Declared In

OCKGroupedBarChartView.h

– chartView:colorForDataSeriesAtIndex: required method

Bar color of a specified data series.

- (UIColor *)chartView:(OCKGroupedBarChartView *)chartView colorForDataSeriesAtIndex:(NSUInteger)dataSeriesIndex

Parameters

chartView

An object representing the chart view requesting this information.

dataSeriesIndex

Index of a data series.

Return Value

Color of a specified data series.

Declared In

OCKGroupedBarChartView.h

– chartView:nameForDataSeriesAtIndex: required method

Name of a specified data series. It will be showed in legend view.

- (NSString *)chartView:(OCKGroupedBarChartView *)chartView nameForDataSeriesAtIndex:(NSUInteger)dataSeriesIndex

Parameters

chartView

An object representing the chart view requesting this information.

dataSeriesIndex

Index of a data series.

Return Value

Name of a specified data series.

Declared In

OCKGroupedBarChartView.h

– chartView:valueForCategoryAtIndex:inDataSeriesAtIndex: required method

Numeric value for bar at category index in a data series.

- (NSNumber *)chartView:(OCKGroupedBarChartView *)chartView valueForCategoryAtIndex:(NSUInteger)categoryIndex inDataSeriesAtIndex:(NSUInteger)dataSeriesIndex

Parameters

chartView

An object representing the chart view requesting this information.

categoryIndex

Index of a category.

dataSeriesIndex

Index of a data series.

Return Value

Numeric value for bar.

Declared In

OCKGroupedBarChartView.h

– chartView:valueStringForCategoryAtIndex:inDataSeriesAtIndex: required method

Value string for bar at category index in a data series. It will be displayed at the end of bar.

- (nullable NSString *)chartView:(OCKGroupedBarChartView *)chartView valueStringForCategoryAtIndex:(NSUInteger)categoryIndex inDataSeriesAtIndex:(NSUInteger)dataSeriesIndex

Parameters

chartView

An object representing the chart view requesting this information.

categoryIndex

Index of a category.

dataSeriesIndex

Index of a data series.

Return Value

Value string value for bar.

Declared In

OCKGroupedBarChartView.h

– chartView:titleForCategoryAtIndex: required method

Title for a category. It will be showed as axis index label.

- (nullable NSString *)chartView:(OCKGroupedBarChartView *)chartView titleForCategoryAtIndex:(NSUInteger)categoryIndex

Parameters

chartView

An object representing the chart view requesting this information.

categoryIndex

Index of a category.

Return Value

Title of a category.

Declared In

OCKGroupedBarChartView.h

– chartView:subtitleForCategoryAtIndex:

Subtitle for a category. It will be showed as axis index subtitle label.

- (nullable NSString *)chartView:(OCKGroupedBarChartView *)chartView subtitleForCategoryAtIndex:(NSUInteger)categoryIndex

Parameters

chartView

An object representing the chart view requesting this information.

categoryIndex

Index of a category.

Return Value

Subtitle of a category.

Declared In

OCKGroupedBarChartView.h

– maximumScaleRangeValueOfChartView:

Maximum value of scale range. If this method is not implemented, the maximum value is determined automatically. The specified maximum value will be ignored if it is less than the maximum value of the bar values.

- (nullable NSNumber *)maximumScaleRangeValueOfChartView:(OCKGroupedBarChartView *)chartView

Parameters

chartView

An object representing the chart view requesting this information.

Return Value

Maximum value of scale range.

Declared In

OCKGroupedBarChartView.h

– minimumScaleRangeValueOfChartView:

Minimum value of scale range. If this method is not implemented, the minimum value is determined automatically. The specified minimum value will be ignored if it is greater than the minimum value of the bar values.

- (nullable NSNumber *)minimumScaleRangeValueOfChartView:(OCKGroupedBarChartView *)chartView

Parameters

chartView

An object representing the chart view requesting this information.

Return Value

Minimum value of scale range.

Declared In

OCKGroupedBarChartView.h