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
X -axis - time , sometimes incorrectly displayed ( many of the data points ) #1528
Comments
And the problem is?.. |
@danielgindi X -axis , incorrectly displayed for time sometimes |
Newbie to programming...would you be able to post sample code to implement your time axis? |
@ksaroka this is sample code |
Thanks a bunch for posting...I'm trying to implement a string x axis from a realm database... first the formatter is invoked at the beginning with a variable called "date":
next in viewDidLoad the results of a Realm database are imported:
finally in setChart modified the code to adapt to Charts 3 func setChart1(dataPoints: [Double], chartInfo: String, chartDescription: String) {
Only problem is that it doesn't graph! I get an error "Thread 1: EXC_BAD_INSTRUCTION in the formatter:
If i just set the date variable in formatter with actual values it graphs OK, but it seems that I'm missing something integral to getting the data from the database into that variable. |
Nevermind! Figured it out. For anybody using Realm Databases I implemented the following code in the formatter....probably fundamental error on scopes on my part. To implement:
|
You solved the problem yet ? @ksaroka |
Yes, the problem has been solved. Posted code above, thanks for your help 👍 |
@monkeyRing can @ksaroka's code solve yours? |
@liuxuan30 Prior to this, I changed another way to solve. His program has not been tested. But thx your reply . |
I'd say if possible please give your own solution here and close the issue, thanks :) |
In the controller, there are two different charts is a time-chart. |
what's the problem ?
The text was updated successfully, but these errors were encountered: