Comments (23)
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.
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.
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.
I got it working like this 👍
I also tried CubicLinePathGenerator
but the data showing is wrong
from swiftcharts.
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.
If I generate the X axis at regular intervals will it solve the cure issue?
from swiftcharts.
No the curve needs to be solved directly in the layer. Is this the only issue?
from swiftcharts.
I am on the process of converting this as in the original pic.
haven't faced anything else as of now.
from swiftcharts.
Ok I'll check the curves in the evening (in about 8 hours). For now please continue using lines.
from swiftcharts.
thanks mate :)
from swiftcharts.
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.
I am using
pod 'SwiftCharts'
in my pod file and I did 'pod update' still this change is not getting reflected
from swiftcharts.
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.
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.
it looks okay but the curves are little bit sharp (irony)
I gave tension 0.1
from swiftcharts.
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.
Sorry 👎
I tried ranging from 0 to 0.3 it only get worse :(
from swiftcharts.
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.
Yes I did,
this is with tension 0.1
from swiftcharts.
Will try something, give me a few minutes.
from swiftcharts.
Thanks mate and please take your time.
from swiftcharts.
Ok, I managed to get a curve like this
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.
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)
- Static library
- Temporarily hide lines in Line chart
- What's the correct way to set contentView background color and border? HOT 1
- Is this kind of y axis layout possible:
- Extending Views to create custom views isn't working due to file private and internal properties
- How to overlay a layer of labels?
- Axis disappear after coming back from background
- X Y points in horizontal bar chart keeps moving rights; when the y axis labels length (text) is more
- Swift 5
- Changing axis values
- X values not adding properly
- Axis Labels not showing up HOT 2
- ChartLabelSettings() ignoring supplied font color, always defaults to black HOT 1
- SPM Support?
- Problem building on new MacBook
- SPM not working properly due to missing TAG HOT 1
- x, y Axis didn't show in the Chart HOT 2
- ChartPointsBubbleLayer not draws properly HOT 1
- how to dynamic live update line chart
- How can i make xAxisLabel to get multiple data instead of one value for one xAxisLabel ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swiftcharts.