Toggle navigation
Toggle navigation
This project
Loading...
Sign in
iOS
/
PNChart
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
kevinzhow
2014-09-11 04:22:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
78fa9d1e4972091135033dd7c09123368c17cc7d
78fa9d1e
1 parent
c90adb31
Fix pie crash #78 #96 #80 #45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
13 deletions
PNChart/PNPieChart.m
PNChart/PNPieChartDataItem.h
PNChart/PNPieChartDataItem.m
PNChart/PNPieChart.m
View file @
78fa9d1
...
...
@@ -123,7 +123,7 @@
_currentTotal
+=
currentDataItem
.
value
;
NSString
*
titleText
=
currentDataItem
.
d
escription
;
NSString
*
titleText
=
currentDataItem
.
textD
escription
;
if
(
!
titleText
){
titleText
=
[
NSString
stringWithFormat
:
@"%.0f%%"
,
currentDataItem
.
value
/
_total
*
100
];
}
...
...
PNChart/PNPieChartDataItem.h
View file @
78fa9d1
...
...
@@ -17,8 +17,8 @@
color
:(
UIColor
*
)
color
description
:(
NSString
*
)
description
;
@property
(
nonatomic
,
readonly
)
CGFloat
value
;
@property
(
nonatomic
,
readonly
)
UIColor
*
color
;
@property
(
nonatomic
,
readonly
)
NSString
*
d
escription
;
@property
(
nonatomic
)
CGFloat
value
;
@property
(
nonatomic
)
UIColor
*
color
;
@property
(
nonatomic
)
NSString
*
textD
escription
;
@end
...
...
PNChart/PNPieChartDataItem.m
View file @
78fa9d1
...
...
@@ -8,14 +8,6 @@
#import "PNPieChartDataItem.h"
@interface
PNPieChartDataItem
()
@property
(
nonatomic
,
readwrite
)
CGFloat
value
;
@property
(
nonatomic
,
readwrite
)
UIColor
*
color
;
@property
(
nonatomic
,
readwrite
)
NSString
*
description
;
@end
@implementation
PNPieChartDataItem
...
...
@@ -31,7 +23,7 @@
color
:(
UIColor
*
)
color
description
:(
NSString
*
)
description
{
PNPieChartDataItem
*
item
=
[
PNPieChartDataItem
dataItemWithValue
:
value
color
:
color
];
item
.
d
escription
=
description
;
item
.
textD
escription
=
description
;
return
item
;
}
...
...
Please
register
or
login
to post a comment