ORKIBPieChartViewDataSource Class Reference
Inherits from | NSObject |
---|---|
Conforms to | ORKPieChartViewDataSource |
Declared in | ORKPieChartView.m |
– numberOfSegmentsInPieChartView:
Asks the data source for the number of segments in the pie chart view.
- (NSInteger)numberOfSegmentsInPieChartView:(ORKPieChartView *)pieChartView
Parameters
pieChartView |
The pie chart view asking for the number of segments. |
---|
Return Value
The number of segments in the pie chart view.
Declared In
ORKPieChartView.h
– pieChartView:valueForSegmentAtIndex:
Asks the data source for the value of a segment in the pie chart view.
- (CGFloat)pieChartView:(ORKPieChartView *)pieChartView valueForSegmentAtIndex:(NSInteger)index
Parameters
pieChartView |
The pie chart view asking for the value of the segment. |
---|---|
index |
An index number specifying the segment in the pie chart view. |
Return Value
The value of the segment at the specified index
in the pie chart view.
Discussion
The value can be any arbitrary integer: the pie chart view normalizes them by the sum of all returned values.
Declared In
ORKPieChartView.h
– pieChartView:colorForSegmentAtIndex:
Asks the data source for the color of a segment in the pie chart view.
- (UIColor *)pieChartView:(ORKPieChartView *)pieChartView colorForSegmentAtIndex:(NSInteger)index
Parameters
pieChartView |
The pie chart view asking for the color of the segment. |
---|---|
index |
An index number specifying the segment in the pie chart view. |
Return Value
The color of the segment at the specified index
in the pie chart view.
Discussion
If this method is not implemented, the pie chart view uses a unique shade of the current tint color for each segment.
Declared In
ORKPieChartView.h
– pieChartView:titleForSegmentAtIndex:
Asks the data source for the title to appear in the legend for a segment in the pie chart view.
- (NSString *)pieChartView:(ORKPieChartView *)pieChartView titleForSegmentAtIndex:(NSInteger)index
Parameters
pieChartView |
The pie chart view asking for the title. |
---|---|
index |
An index number specifying the segment in the pie chart view. |
Return Value
The title of the segment at the specified index in the pie chat view’s legend.
Discussion
If this method is not implemented, the pie chart view does not display the legend.
Declared In
ORKPieChartView.h