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
Gabe Heafitz
2014-10-30 21:42:47 -0400
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
02f0d5b7aaa239f8df3041f8e85a47c8ebab7a72
02f0d5b7
1 parent
d3911139
Remove some superfluous comments.
Also, remove a few lines of crufty code.
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
27 deletions
PNChart/PNBar.m
PNChart/PNBarChart.m
PNChart/PNColor.h
PNChart/PNColor.m
PNChart/PNLineChart.m
PNChart/PNLineChartDataItem.m
PNChart/PNBar.m
View file @
02f0d5b
...
...
@@ -16,7 +16,6 @@
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
// Initialization code
_chartLine
=
[
CAShapeLayer
layer
];
_chartLine
.
lineCap
=
kCALineCapButt
;
_chartLine
.
fillColor
=
[[
UIColor
whiteColor
]
CGColor
];
...
...
@@ -72,7 +71,6 @@
CAShapeLayer
*
gradientMask
=
[
CAShapeLayer
layer
];
gradientMask
.
fillColor
=
[[
UIColor
clearColor
]
CGColor
];
gradientMask
.
strokeColor
=
[[
UIColor
blackColor
]
CGColor
];
//gradientMask.lineWidth = 4;
gradientMask
.
lineWidth
=
self
.
frame
.
size
.
width
;
gradientMask
.
frame
=
CGRectMake
(
0
,
0
,
self
.
bounds
.
size
.
width
,
self
.
bounds
.
size
.
height
);
gradientMask
.
path
=
progressline
.
CGPath
;
...
...
@@ -123,7 +121,6 @@
// An empty implementation adversely affects performance during animation.
-
(
void
)
drawRect
:
(
CGRect
)
rect
{
//Draw BG
CGContextRef
context
=
UIGraphicsGetCurrentContext
();
CGContextSetFillColorWithColor
(
context
,
self
.
backgroundColor
.
CGColor
);
...
...
PNChart/PNBarChart.m
View file @
02f0d5b
...
...
@@ -26,7 +26,6 @@
self
=
[
super
initWithFrame
:
frame
];
if
(
self
)
{
// Initialization code
self
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
clipsToBounds
=
YES
;
_showLabel
=
YES
;
...
...
PNChart/PNColor.h
View file @
02f0d5b
PNChart/PNColor.m
View file @
02f0d5b
...
...
@@ -16,9 +16,7 @@
UIGraphicsBeginImageContext
(
rect
.
size
);
CGContextRef
context
=
UIGraphicsGetCurrentContext
();
CGContextSetFillColorWithColor
(
context
,
[
color
CGColor
]);
// [[UIColor colorWithRed:222./255 green:227./255 blue: 229./255 alpha:1] CGColor]) ;
CGContextSetFillColorWithColor
(
context
,
[
color
CGColor
]);
CGContextFillRect
(
context
,
rect
);
UIImage
*
img
=
UIGraphicsGetImageFromCurrentImageContext
();
UIGraphicsEndImageContext
();
...
...
PNChart/PNLineChart.m
View file @
02f0d5b
...
...
@@ -12,9 +12,6 @@
#import "PNLineChartData.h"
#import "PNLineChartDataItem.h"
// ------------------------------------------------------------------------------------------------
// private interface declaration
// ------------------------------------------------------------------------------------------------
@interface
PNLineChart
()
@property
(
nonatomic
)
NSMutableArray
*
chartLineArray
;
// Array[CAShapeLayer]
...
...
@@ -27,9 +24,6 @@
@end
// ------------------------------------------------------------------------------------------------
// public interface implementation
// ------------------------------------------------------------------------------------------------
@implementation
PNLineChart
#pragma mark initialization
...
...
@@ -379,9 +373,6 @@
[
pointLayer
addAnimation
:
pathAnimation
forKey
:
@"strokeEndAnimation"
];
}
[
CATransaction
setCompletionBlock
:
^
{
// pointLayer.strokeEnd = 1.0f; // stroken point when animation end
}];
[
CATransaction
commit
];
UIGraphicsEndImageContext
();
...
...
PNChart/PNLineChartDataItem.m
View file @
02f0d5b
...
...
@@ -5,21 +5,14 @@
#import "PNLineChartDataItem.h"
//------------------------------------------------------------------------------------------------
// private interface declaration
//------------------------------------------------------------------------------------------------
@interface
PNLineChartDataItem
()
-
(
id
)
initWithY
:
(
CGFloat
)
y
;
@property
(
readwrite
)
CGFloat
y
;
// should be within the y range
@end
@end
//------------------------------------------------------------------------------------------------
// public interface implementation
//------------------------------------------------------------------------------------------------
@implementation
PNLineChartDataItem
+
(
PNLineChartDataItem
*
)
dataItemWithY
:(
CGFloat
)
y
...
...
@@ -27,7 +20,6 @@
return
[[
PNLineChartDataItem
alloc
]
initWithY
:
y
];
}
-
(
id
)
initWithY
:(
CGFloat
)
y
{
if
((
self
=
[
super
init
]))
{
...
...
@@ -37,5 +29,4 @@
return
self
;
}
@end
...
...
Please
register
or
login
to post a comment