ORKPieChartView Class Reference

Inherits from UIView
Declared in ORKPieChartView.h

The ORKPieChartView class presents data provided by an object conforming to the ORKPieChartViewDataSource protocol as a pie chart.

  dataSource

The data source object responsible for populating the pie chart with data.

@property (nonatomic, weak, nullable) id<ORKPieChartViewDataSource> dataSource

Declared In

ORKPieChartView.h

  lineWidth

The width of the line used to draw the circular sections of the pie chart.

@property (nonatomic) IBInspectable CGFloat lineWidth

Discussion

If you do not set a value for this property, the pie chart view assumes a sensible value. If you set a number higher than the radius of the pie chart, the pie chart draws a completely filled pie.

Declared In

ORKPieChartView.h

  title

The text to display as a title in the pie chart view.

@property (nonatomic, copy, nullable) IBInspectable NSString *title

Discussion

If you do not set a value for this property, the pie chart does not display a title.

Declared In

ORKPieChartView.h

  text

The text to display beneath the title in the pie chart view.

@property (nonatomic, copy, nullable) IBInspectable NSString *text

Discussion

If you do not set a value for this property, the pie chart does not display any text beneath the title.

Declared In

ORKPieChartView.h

  titleColor

The color used for the text of the title label.

@property (nonatomic, strong, null_resettable) IBInspectable UIColor *titleColor

Discussion

The default value for this property is a light gray color. Setting this property to nil resets it to its default value.

Declared In

ORKPieChartView.h

  textColor

The color used for the text of the text label.

@property (nonatomic, strong, null_resettable) IBInspectable UIColor *textColor

Discussion

The default value for this property is a light gray color. Setting this property to nil resets it to its default value.

Declared In

ORKPieChartView.h

  showsTitleAboveChart

A Boolean value indicating whether the title and text labels should be drawn above the chart.

@property (nonatomic) IBInspectable BOOL showsTitleAboveChart

Discussion

If this value of this property is NO, the title and text are drawn at the center of the chart. The default value for this property is NO.

Declared In

ORKPieChartView.h

  showsPercentageLabels

A Boolean value indicating whether the pie chart should draw percentage labels next to each segement.

@property (nonatomic) IBInspectable BOOL showsPercentageLabels

Discussion

The default value for this property is YES.

Declared In

ORKPieChartView.h

  drawsClockwise

A Boolean value indicating whether the pie chart drawing animation draws clockwise or counterclockwise.

@property (nonatomic) IBInspectable BOOL drawsClockwise

Discussion

The default value for this property is YES.

Declared In

ORKPieChartView.h

  noDataText

The string that will be displayed if the sum of the values of all segments is zero.

@property (nonatomic, copy, null_resettable) IBInspectable NSString *noDataText

Discussion

The default value for this property is an appropriate message string. Setting this property to nil resets it to its default value.

Declared In

ORKPieChartView.h

– animateWithDuration:

Animates the pie chart when it is first displayed on the screen.

- (void)animateWithDuration:(NSTimeInterval)animationDuration

Parameters

animationDuration

The duration of the appearing animation.

Discussion

You can optionally call this method from the viewWillAppear: implementation of the view controller that owns the pie chart view.

Declared In

ORKPieChartView.h

– reloadData

Reloads the plotted data.

- (void)reloadData

Discussion

Call this method to reload the data and re-plot the graph. You should call it if the data provided by the dataSource changes.

Declared In

ORKPieChartView.h

  radiusScaleFactor

A scaling facor for the radius of the pie chart. Increase it to increase the radius of the pie chart and vice versa.

@property (nonatomic) CGFloat radiusScaleFactor

Discussion

Defaults to 0.5.

Declared In

ORKPieChartView.h