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
onevcat
2014-12-25 10:26:23 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
812f642351d1d80346374550b6017ee3af711498
812f6423
1 parent
815f5f98
Add initWithCoder for bar chart
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
PNChart/PNBarChart.m
PNChart/PNBarChart.m
View file @
812f642
...
...
@@ -22,11 +22,29 @@
@implementation
PNBarChart
-
(
id
)
initWithCoder
:(
NSCoder
*
)
aDecoder
{
self
=
[
super
initWithCoder
:
aDecoder
];
if
(
self
)
{
[
self
setupDefaultValues
];
}
return
self
;
}
-
(
id
)
initWithFrame
:(
CGRect
)
frame
{
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
[
self
setupDefaultValues
];
}
return
self
;
}
-
(
void
)
setupDefaultValues
{
self
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
clipsToBounds
=
YES
;
_showLabel
=
YES
;
...
...
@@ -44,12 +62,8 @@
_showChartBorder
=
NO
;
_yChartLabelWidth
=
18
;
_rotateForXAxisText
=
false
;
}
return
self
;
}
-
(
void
)
setYValues
:
(
NSArray
*
)
yValues
{
_yValues
=
yValues
;
...
...
Please
register
or
login
to post a comment