GithubHelp home page GithubHelp logo

Comments (23)

ivnsch avatar ivnsch commented on August 23, 2024

Hi,
yes it is, take a look at the multiaxis example. For the curved lines you can use layer of the cubic line example. For the little circles on the lines you can copy the layer from show touch coords example. You also find formatted date, dividers and straight guidelines in some of the examples (e.g. candlestick).

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

Yes, I looked at the multi axis, but I was not able to hide the X axis, it always shows the both axis.

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

Hide how exactly? In your image the axes are visible...

2015-10-14 6:04 GMT+02:00 vineethvijayan [email protected]:

Yes, I looked at the multi axis, but I was not able to hide the y axis, it
always shows the both axis.


Reply to this email directly or view it on GitHub
#47 (comment)
.

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

I got it working like this 👍

img_0044

I also tried CubicLinePathGenerator

img_0042

but the data showing is wrong

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

Hmm ok the curves need tuning, but besides of that what is wrong? Note also that you don't have generate the x axis values using the chart points, you can use regular intervals. When you say hide the axis you mean the axis title? If yes passing an empty string and negative spacing between axes would work (this should be an optional though).

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

If I generate the X axis at regular intervals will it solve the cure issue?

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

No the curve needs to be solved directly in the layer. Is this the only issue?

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

I am on the process of converting this as in the original pic.

haven't faced anything else as of now.

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

Ok I'll check the curves in the evening (in about 8 hours). For now please continue using lines.

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

thanks mate :)

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

Now it's possible to pass tensions values to the cubic line to control the curviness. 4e83383

You need 0.1 or so. For now you will have to use master to get this change. It's stable.

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

I am using
pod 'SwiftCharts'
in my pod file and I did 'pod update' still this change is not getting reflected

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

One more thing, is this something that is needed to be changed according to data?
Asking this because the data will be dynamic

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

pod update only works with released versions. You have to use

pod 'SwiftCharts', :git => 'https://github.com/i-schuetz/SwiftCharts.git'

in your podfile (and then install or update).
You don't have to change tension depending on data.

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

it looks okay but the curves are little bit sharp (irony)

img_0045

I gave tension 0.1

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

You can try out different tension values. I just committed something else which helps with the sharp corners (doesn't affect the curviness of the lines though).

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

Sorry 👎

I tried ranging from 0 to 0.3 it only get worse :(

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

Did you run pod update again to get the last commit?

For further improvement as you see it's possible to pass your own curve generator. You can copy the current one and try to adjust it. Otherwise you can open an issue and I tackle it when I have more time (this will not be in the next days though).

Being practical - With 0.1 tension, the last commit, thicker lines and circles on the corners isn't it close enough to your initial image?

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

Yes I did,

img_0046

this is with tension 0.1

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

Will try something, give me a few minutes.

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

Thanks mate and please take your time.

from swiftcharts.

ivnsch avatar ivnsch commented on August 23, 2024

Ok, I managed to get a curve like this

simulator screen shot 15 oct 2015 13 37 19

with points [(0, 1), (2, 16), (3, 8), (9, -16), (10, -56), (13, -80)]

The issue is that the current implementation has not real interpolation algorithm. For the new curve I used this project: https://github.com/jnfisher/ios-curve-interpolation
Problem with this is it takes some time to add this to the library, for example, for some reason the first and last point are not shown in interpolateCGPointsWithCatmullRom so had to add filler points and interpolateCGPointsWithHermite looks weird.

For now I'd suggest that you pass your own path generator in which you use this project to interpolate the curve. Basically:

return UIBezierPath.interpolateCGPointsWithCatmullRom(points.map{NSValue(CGPoint: $0)}, closed: false, alpha: 1)

(or any other interpolation algorithm)

Keep in mind that you need a bridging header file for this as it's an obj-c project.

If you have more questions feel free to continue commenting this issue.

from swiftcharts.

vineethvijayan avatar vineethvijayan commented on August 23, 2024

For now I will use the straight lines. I am very new to iOS so everything is very sketchy.

Now I have to try and include the bubbles with some labels.

Thanks a lot for your time.

from swiftcharts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.