YLPieSliceChartView Class Reference
Inherits from | UIView |
Conforms to | YLPieChartDataSource YLPieChartDelegate |
Declared in | YLPieSliceChartView.h YLPieSliceChartView.m |
Overview
This view uses YLPieChartView internally to show a single pie slice chart view. Use this view instead of YLPieChartView if you want to display a single value only in the pie chart.
Tasks
Properties
-
pieChartView
Reference to the internally used YLPieChartView instance.
property -
sliceValue
Normalized value of the pie slice. This value should be between 0.0 and 1.0!
property -
sliceColor
Color of the pie slice.
property
Instance Methods
-
– reloadDataAnimated:
Call this method to reflect property changes.
Other Methods
-
– numberOfSlicesInPieChartView:
Return the number of slices in the pie chart.
-
– pieChartView:valueForSliceAtIndex:
Return the value for a specific pie slice. You don’t need to worry about normalized values since YLPieChartView will normalize the values internally while drawing the pie chart.
-
– pieChartView:colorForSliceAtIndex:
Return the color that should be used for a specific pie slice. If you return nil or don’t implement this method YLPieChartView will auto-generate a color.
-
– showSingleSliceInPieChartView:
Return YES if you only want to display a single pie slice. Have a look at YLPieSliceChartView how this is used.
Properties
pieChartView
Reference to the internally used YLPieChartView instance.
@property (nonatomic, readonly) YLPieChartView *pieChartView
Discussion
Reference to the internally used YLPieChartView instance.
Declared In
YLPieSliceChartView.h
Instance Methods
numberOfSlicesInPieChartView:
Return the number of slices in the pie chart.
- (NSUInteger)numberOfSlicesInPieChartView:(YLPieChartView *)pieChartView
Parameters
- pieChartView
The YLPieChartView instance.
Return Value
Number of slices in the pie chart.
Discussion
Return the number of slices in the pie chart.
Declared In
YLPieChartDataSource.h
pieChartView:colorForSliceAtIndex:
Return the color that should be used for a specific pie slice. If you return nil or don’t implement this method YLPieChartView will auto-generate a color.
- (UIColor *)pieChartView:(YLPieChartView *)pieChartView colorForSliceAtIndex:(NSUInteger)index
Return Value
Color for the pie slice.
Discussion
Return the color that should be used for a specific pie slice. If you return nil or don’t implement this method YLPieChartView will auto-generate a color.
Declared In
YLPieChartDataSource.h
pieChartView:valueForSliceAtIndex:
Return the value for a specific pie slice. You don’t need to worry about normalized values since YLPieChartView will normalize the values internally while drawing the pie chart.
- (CGFloat)pieChartView:(YLPieChartView *)pieChartView valueForSliceAtIndex:(NSUInteger)index
Return Value
Value for the pie slice.
Discussion
Return the value for a specific pie slice. You don’t need to worry about normalized values since YLPieChartView will normalize the values internally while drawing the pie chart.
Declared In
YLPieChartDataSource.h
reloadDataAnimated:
Call this method to reflect property changes.
- (void)reloadDataAnimated:(BOOL)animated
Parameters
- animated
YES if you want to reload the pie chart animated.
Discussion
Call this method to reflect property changes.
Declared In
YLPieSliceChartView.h
showSingleSliceInPieChartView:
Return YES if you only want to display a single pie slice. Have a look at YLPieSliceChartView how this is used.
- (BOOL)showSingleSliceInPieChartView:(YLPieChartView *)pieChartView
Parameters
- pieChartView
The YLPieChartView instance.
Return Value
Boolean value that indicates wether only a single pie slice will be displayed.
Discussion
Return YES if you only want to display a single pie slice. Have a look at YLPieSliceChartView how this is used.
Declared In
YLPieChartDataSource.h