-
-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove border around linechart with gradient fill #747
Comments
Seems it's about drawCubic will introduce this border, while drawLinear does not have it. var pt1 = CGPoint(x: CGFloat(to - 1), y: fillMin)
var pt2 = CGPoint(x: CGFloat(from), y: fillMin)
pt1 = CGPointApplyAffineTransform(pt1, matrix)
pt2 = CGPointApplyAffineTransform(pt2, matrix)
CGPathAddLineToPoint(spline, nil, pt1.x, pt1.y)
CGPathAddLineToPoint(spline, nil, pt2.x, pt2.y)
CGPathCloseSubpath(spline) @danielgindi you think this a bug or by design? |
It does not draw a subpath - it adds the path to the context in order to draw. |
@danielgindi I use ChartsDemo, and set set1.drawCubicEnabled = YES; and I could see it has bounding borders, while linear drawing not have the bounding border (above image) |
This screenshot is cubic- and does not have bounding borders... it has the line above the fill- which you can disable in many ways (transparent color, for example) |
@danielgindi I think the issue is, my screenshot has dash lines around the whole fill area, while linear drawing does not have, on right, left and bottom side: |
I actually found where this issue might be coming from - let me know if this fixed it. |
the fix is positive on my side. |
👍 |
I want to have a gradient fill for a linechart with no border around it. I basically copied the code from the obj-c demo Line Chart 1 (only wrote it using swift), but it draws a border around the fill.
I have (notice the green border, I want the left, right, bottom lines removed):
I want it like this (with no borders on the left, right, and bottom):
Is there a way to do it in Swift that I am missing? Please help.
The text was updated successfully, but these errors were encountered: