-
-
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
Customised size of x data points and Scatter Graph with Linear Trend Line #1274
Comments
Q1: X axis is index based axis currently, so you can't; however, the good news is both Android and iOS library is working on v3.0 to support this. It should be coming soon, but no ETA yet; remember to watch this repo:) You can of course tweak this library to draw figure a, but I don't think it's a smart choice for you, so just wait. Q2: drawing trend lines requires knowledge of CoreGraphics; if you are not familiar with it, grab some tutorials; basically, you should know the (x,y) pairs to connect as trend lines if it's not linear. for linear trend line, consider y = kx+b, so you only need two pairs to draw the line You can take your figure b data to draw it as cubic line first to see if it meets your goals; to draw as cubic, set To get started, take a look at how ChartLimitLine is implemented; for cubic line, check |
I just saw v3.0 branch synced with master. You can be the first user.. :) use at your own risk |
Ohh .. yes. How good luck I am. Now I am facing one issue is to add ChatDataEntry objects to iChartDataSet array. The following is my setChart Function code: var iChartDataSets: [IChartDataSet] = []
|
you should not use iChartDataSet, they are protocols. Use Concrete classes from standard implementation |
Hi Daniel,
Thanks for your awesome library and I have full of hopes that your library can be useful in my first swift application.
I just started a few graphs and stucking on one part.
I would like to create in final is scatter graph with Linear trendline as shown in figure A.
Now I am getting with this lib is as shown in Figure B.
Question 1
Could we change customised size of X-data points ?
now X-axis data point are always same size.
For eg -
Xaxis - 4.7, 9.41, 18.81, 37.6, 75.6
Yaxis - 0.035, 0.146, 0.373, 0.912, 2.276
Question 2
How can I draw Linear trend line (if possible - R square value included)?
I was wondering if you or other contributors can reply my questions.
Thanks and Regards,
NyoSeint Lay
The text was updated successfully, but these errors were encountered: