1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//
// PNPieChart.h
// PNChartDemo
//
// Created by Hang Zhang on 14-5-5.
// Copyright (c) 2014年 kevinzhow. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PNPieChartDataItem.h"
#import "PNGenericChart.h"
#import "PNChartDelegate.h"
@interface PNPieChart : PNGenericChart
- (id)initWithFrame:(CGRect)frame items:(NSArray *)items;
@property (nonatomic, readonly) NSArray *items;
/** Default is 18-point Avenir Medium. */
@property (nonatomic) UIFont *descriptionTextFont;
/** Default is white. */
@property (nonatomic) UIColor *descriptionTextColor;
/** Default is black, with an alpha of 0.4. */
@property (nonatomic) UIColor *descriptionTextShadowColor;
/** Default is CGSizeMake(0, 1). */
@property (nonatomic) CGSize descriptionTextShadowOffset;
/** Default is 1.0. */
@property (nonatomic) NSTimeInterval duration;
/** Show only values, this is useful when legend is present */
@property (nonatomic) BOOL showOnlyValues;
/** Show absolute values not relative i.e. percentages */
@property (nonatomic) BOOL showAbsoluteValues;
/** Hide percentage labels less than cutoff value */
@property (nonatomic, assign) CGFloat labelPercentageCutoff;
/** Default YES. */
@property (nonatomic) BOOL shouldHighlightSectorOnTouch;
/** Current outer radius. Override recompute() to change this. **/
@property (nonatomic) CGFloat outerCircleRadius;
/** Current inner radius. Override recompute() to change this. **/
@property (nonatomic) CGFloat innerCircleRadius;
@property (nonatomic, weak) id<PNChartDelegate> delegate;
/** Update chart items. Does not update chart itself. */
- (void)updateChartData:(NSArray *)data;
/** Multiple selection */
@property (nonatomic, assign) BOOL enableMultipleSelection;
/** show only tiles, not values or percentage */
@property (nonatomic) BOOL hideValues;
- (void)strokeChart;
- (void)recompute;
@end