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
Leii
2015-07-15 23:04:06 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8d9425ead5bb571d8bf18d9f49352690526398ad
8d9425ea
1 parent
434555ea
Add a superclass method invocation
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
PNChart/PNRadarChart.m
PNChart/PNRadarChart.m
View file @
8d9425e
...
...
@@ -29,7 +29,8 @@
self
.
autoresizingMask
=
UIViewAutoresizingFlexibleHeight
|
UIViewAutoresizingFlexibleWidth
;
//Public iVar
if
([
items
count
]
<
3
)
{
if
([
items
count
]
<
3
)
//At least three corners of A polygon ,If the count of items is less than 3 will add 3 default values
{
NSLog
(
@"At least three items!"
);
NSArray
*
defaultArray
=
@[[
PNRadarChartDataItem
dataItemWithValue
:
0
description
:
@"Default"
],
[
PNRadarChartDataItem
dataItemWithValue
:
0
description
:
@"Default"
],
...
...
@@ -62,6 +63,8 @@
_chartPlot
.
fillColor
=
_plotColor
.
CGColor
;
_chartPlot
.
lineWidth
=
1
.
0
;
[
self
.
layer
addSublayer
:
_chartPlot
];
[
super
setupDefaultValues
];
//init detailLabel
_detailLabel
=
[[
UILabel
alloc
]
init
];
_detailLabel
.
backgroundColor
=
[
UIColor
colorWithRed
:.
9
green
:.
9
blue
:
.
1
alpha
:
.
9
];
...
...
@@ -140,7 +143,7 @@
#pragma mark - Draw
-
(
void
)
drawRect
:
(
CGRect
)
rect
{
// Drawing
code
// Drawing
backgound
CGContextRef
context
=
UIGraphicsGetCurrentContext
();
CGContextClearRect
(
context
,
rect
);
int
section
=
0
;
...
...
Please
register
or
login
to post a comment