-
-
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
[Swift 3.0 specific] linear line chart has additional line segments wile zooming in #1421
Comments
I didn't look at it yet, but what exactly changed? It doesn't draw line segments? Or doesn't accept size? |
it changes API implementation, strokeLineSegments used to take a 'size' parameter, while on swift 3.0, it's gone. I see the logic that it will use 'size' to determine how many points are actually connected. However, on swift 3.0, it will just connect all the points in the array, so the logic does not work any more if array size is larger than 'size' parameter You can see from the screenshot, while you zoom in, at right side some additional line segments are drawn. |
how to use in Xcode8 with swift3.0 |
1 similar comment
how to use in Xcode8 with swift3.0 |
please show us how to use / Fix the new issues in Xcode8 - swift3 |
I updated cocoapods and then did a pod update and got around 200 errors when I set it to use LEGACY swift. But if I set it to use current Swift 3 I get over 1000 errors building. I manually started fixing the 200 errors in legacy swift but they kept generating new errors each build. It turned into hours of fixing code but there was never any end in sight. Do we have any status update or a guide to show us how to use this library with Swift3/Xcode8? |
Please don't hijack other issues. Open another one if anything. But to answer your question, point your podfile to the swift 3.0 branch. There is a lot of documentation on this on the cocoapods website. |
try to conver to the swift2.3 and find this root Pod Project -> target Charts -> Building Setting -> Swift Compiler - Version -> Use Legacy swift Language Version set YES, I do these steps then I can run successfully! |
hey guys, stop jamming different topics. For all swift 2.3 and 3.0 information please go to #1291. |
@maxydon please try master branch. In Chart 3.0 the code has changed, so the bug should be gone. But Swift3.0 branch had this bug. I have merged #1420 into Swift 3.0 branch, however, you should understand that, this branch is obsoleted, you should move to Chart 3.0. |
master sims to have 2.2.5. Where do i find 3.0? |
No. master is 3.0. It just isn't final yet so it is not released |
I see but it's giving me a lot of errors i guess it's not written in swift 3?! |
Charts 3.0 on master is written in Swift 3.0. Please do a git pull to fetch latest or redownload the project. |
So when testing line chart zooming in Swift 3.0 + Chart 2.2.5,
![buggggg](https://cloud.githubusercontent.com/assets/4375169/18372086/4a237df4-766c-11e6-9607-6d155df9c86d.png)
seeing weird thing:
It turned out that Swift 3.0 has totally changed the API signature:
Swift 3.0 is
while swift 2.x is like
@danielgindi I am not sure if we should continue using line segments, or we move to old fashion like moveTo, addLineTo.. etc.
I had a simple fix #1420, but it simply destroy
_lineSegments
to make sure it does not have dirty points to draw, kind of loosing the performance.Any thoughts?
The text was updated successfully, but these errors were encountered: