Core Plot (macOS)
Cocoa plotting framework for macOS, iOS, and tvOS
<CPTBarPlotDataSource> Protocol Reference

A bar plot data source. More...

#import <CPTBarPlot.h>

+ Inheritance diagram for <CPTBarPlotDataSource>:
+ Collaboration diagram for <CPTBarPlotDataSource>:

Public Instance Methods

Bar Style
(nullable CPTFillArray *) - barFillsForBarPlot:recordIndexRange:
 (Optional) Gets an array of bar fills for the given bar plot. More...
 
(nullable CPTFill *) - barFillForBarPlot:recordIndex:
 (Optional) Gets a bar fill for the given bar plot. This method will not be called if -barFillsForBarPlot:recordIndexRange: is also implemented in the datasource. More...
 
(nullable CPTLineStyleArray *) - barLineStylesForBarPlot:recordIndexRange:
 (Optional) Gets an array of bar line styles for the given bar plot. More...
 
(nullable CPTLineStyle *) - barLineStyleForBarPlot:recordIndex:
 (Optional) Gets a bar line style for the given bar plot. This method will not be called if -barLineStylesForBarPlot:recordIndexRange: is also implemented in the datasource. More...
 
(nullable CPTNumberArray *) - barWidthsForBarPlot:recordIndexRange:
 (Optional) Gets an array of bar widths for the given bar plot. More...
 
(nullable NSNumber *) - barWidthForBarPlot:recordIndex:
 (Optional) Gets a bar width for the given bar plot. This method will not be called if -barWidthsForBarPlot:recordIndexRange: is also implemented in the datasource. More...
 
Legends
(nullable NSString *) - legendTitleForBarPlot:recordIndex:
 (Optional) Gets the legend title for the given bar plot bar. More...
 
(nullable NSAttributedString *) - attributedLegendTitleForBarPlot:recordIndex:
 (Optional) Gets the styled legend title for the given bar plot bar. More...
 
- Public Instance Methods inherited from <CPTPlotDataSource>
(NSUInteger- numberOfRecordsForPlot:
 (Required) The number of data points for the plot. More...
 
(nullable NSArray *) - numbersForPlot:field:recordIndexRange:
 (Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. More...
 
(nullable id- numberForPlot:field:recordIndex:
 (Optional) Gets a plot data value for the given plot and field. Implement one and only one of the optional methods in this section. More...
 
(nullable double *) - doublesForPlot:field:recordIndexRange:
 (Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. More...
 
(double) - doubleForPlot:field:recordIndex:
 (Optional) Gets a plot data value for the given plot and field. Implement one and only one of the optional methods in this section. More...
 
(nullable CPTNumericData *) - dataForPlot:field:recordIndexRange:
 (Optional) Gets a range of plot data for the given plot and field. Implement one and only one of the optional methods in this section. More...
 
(nullable CPTNumericData *) - dataForPlot:recordIndexRange:
 (Optional) Gets a range of plot data for all fields of the given plot simultaneously. Implement one and only one of the optional methods in this section. More...
 
(nullable CPTLayerArray *) - dataLabelsForPlot:recordIndexRange:
 (Optional) Gets a range of data labels for the given plot. More...
 
(nullable CPTLayer *) - dataLabelForPlot:recordIndex:
 (Optional) Gets a data label for the given plot. This method will not be called if -dataLabelsForPlot:recordIndexRange: is also implemented in the datasource. More...
 
- Public Instance Methods inherited from <NSObject>
(NSString *) - description
 
(NSUInteger- hash
 
(BOOL- isEqual:
 

Detailed Description

A bar plot data source.

Method Documentation

◆ attributedLegendTitleForBarPlot:recordIndex:

- (nullable NSAttributedString *) attributedLegendTitleForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndex: (NSUInteger idx 

(Optional) Gets the styled legend title for the given bar plot bar.

Parameters
barPlotThe bar plot.
idxThe data index of interest.
Returns
The styled title text for the legend entry for the point with the given index.

◆ barFillForBarPlot:recordIndex:

- (nullable CPTFill *) barFillForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndex: (NSUInteger idx 

(Optional) Gets a bar fill for the given bar plot. This method will not be called if -barFillsForBarPlot:recordIndexRange: is also implemented in the datasource.

Parameters
barPlotThe bar plot.
idxThe data index of interest.
Returns
The bar fill for the bar with the given index. If the data source returns nil, the default fill is used. If the data source returns an NSNull object, no fill is drawn.

◆ barFillsForBarPlot:recordIndexRange:

- (nullable CPTFillArray *) barFillsForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndexRange: (NSRange indexRange 

(Optional) Gets an array of bar fills for the given bar plot.

Parameters
barPlotThe bar plot.
indexRangeThe range of the data indexes of interest.
Returns
An array of bar fills.

◆ barLineStyleForBarPlot:recordIndex:

- (nullable CPTLineStyle *) barLineStyleForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndex: (NSUInteger idx 

(Optional) Gets a bar line style for the given bar plot. This method will not be called if -barLineStylesForBarPlot:recordIndexRange: is also implemented in the datasource.

Parameters
barPlotThe bar plot.
idxThe data index of interest.
Returns
The bar line style for the bar with the given index. If the data source returns nil, the default line style is used. If the data source returns an NSNull object, no line is drawn.

◆ barLineStylesForBarPlot:recordIndexRange:

- (nullable CPTLineStyleArray *) barLineStylesForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndexRange: (NSRange indexRange 

(Optional) Gets an array of bar line styles for the given bar plot.

Parameters
barPlotThe bar plot.
indexRangeThe range of the data indexes of interest.
Returns
An array of line styles.

◆ barWidthForBarPlot:recordIndex:

- (nullable NSNumber *) barWidthForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndex: (NSUInteger idx 

(Optional) Gets a bar width for the given bar plot. This method will not be called if -barWidthsForBarPlot:recordIndexRange: is also implemented in the datasource.

Parameters
barPlotThe bar plot.
idxThe data index of interest.
Returns
The bar width for the bar with the given index. If the data source returns nil, the default barWidth is used.

◆ barWidthsForBarPlot:recordIndexRange:

- (nullable CPTNumberArray *) barWidthsForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndexRange: (NSRange indexRange 

(Optional) Gets an array of bar widths for the given bar plot.

Parameters
barPlotThe bar plot.
indexRangeThe range of the data indexes of interest.
Returns
An array of bar widths.

◆ legendTitleForBarPlot:recordIndex:

- (nullable NSString *) legendTitleForBarPlot: (nonnull CPTBarPlot *)  barPlot
recordIndex: (NSUInteger idx 

(Optional) Gets the legend title for the given bar plot bar.

Parameters
barPlotThe bar plot.
idxThe data index of interest.
Returns
The title text for the legend entry for the point with the given index.

The documentation for this protocol was generated from the following file: