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
Kevin
2014-06-09 23:56:58 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
5c50399be52aaf00e55fac4d76b7134082dc1f6f
5c50399b
2 parents
755fc00a
fd0472a2
Merge pull request #65 from dral3x/master
Fixed wrong line width in line chart
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
PNChart/PNLineChart/PNLineChart.m
PNChart/PNLineChart/PNLineChart.m
View file @
5c50399
...
...
@@ -365,16 +365,13 @@
self
.
chartPointArray
=
[
NSMutableArray
arrayWithCapacity
:
data
.
count
];
// set for point stoken
float
circle_stroke_width
=
2
.
f
;
float
line_width
=
3
.
0
f
;
for
(
PNLineChartData
*
chartData
in
data
)
{
// create as many chart line layers as there are data-lines
CAShapeLayer
*
chartLine
=
[
CAShapeLayer
layer
];
chartLine
.
lineCap
=
kCALineCapButt
;
chartLine
.
lineJoin
=
kCALineJoinMiter
;
chartLine
.
fillColor
=
[[
UIColor
whiteColor
]
CGColor
];
chartLine
.
lineWidth
=
line_w
idth
;
chartLine
.
lineWidth
=
chartData
.
lineW
idth
;
chartLine
.
strokeEnd
=
0
.
0
;
[
self
.
layer
addSublayer
:
chartLine
];
[
self
.
chartLineArray
addObject
:
chartLine
];
...
...
@@ -385,7 +382,7 @@
pointLayer
.
lineCap
=
kCALineCapRound
;
pointLayer
.
lineJoin
=
kCALineJoinBevel
;
pointLayer
.
fillColor
=
nil
;
pointLayer
.
lineWidth
=
c
ircle_stroke_w
idth
;
pointLayer
.
lineWidth
=
c
hartData
.
lineW
idth
;
[
self
.
layer
addSublayer
:
pointLayer
];
[
self
.
chartPointArray
addObject
:
pointLayer
];
...
...
Please
register
or
login
to post a comment