-
-
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
X Axis for Candle Sticks from Realm #1214
Comments
it seems a long story.. but right now the x axis is index based one, so the date you are saying is merely a string at a specific index. |
Well, I saw that issue when looking here, but what you're expecting is for the dates to be used as a value, with space in between depending on the date intervals. My main issues here (apart from finding out how to make this work, but that's just me...) are that the types that can be provided for the X Axis are extremely constrained, while there could be some ways to get those that are way more straightforward, and that this creates an issue of having to persist those values, which feels a bit overkill. |
Can you please try again with Charts 3.0? As the x-index concept has gone away, you should be able to set dates as x values for each entry. (You will still have to convert them to doubles) |
I've checked with Charts 3.0, and it seems that the Realm CandleStick sample works fine, no crashes or anything. All you need to do for having dates as the X value, is represent them as Doubles, which is the standard practice. in iOS the |
When's 3.0 due for release? I'm using Charts for a date based graph but if it's a while off I'll work around the xIndex Int for the moment. |
It will be a few days, that we dedicate for feedback, bugfixes etc. |
Awesome, it's a few weeks off so I'll keep my workaround in place and update to 3.0 when it's baked. Thanks for the quick reply! |
Hey,
I've been trying to set up a candle stick chart from Realm results, and ran into quite a few surprises:
After looking at the sample code, the only way to create such a chart from Realm results is to:
Wouldn't it make sense to allow the use of non-persisted properties to do that? It is extremely cumbersome to have to create persisted properties for that, and terrible performance-wise when you're juggling with a database containing millions of those datapoints, and these properties can be inferred from one that already exists.
Alternatively, I'm wondering if it wouldn't be better to just provide a RLMResults, already ordered, and just use the index of those objects from the RLMResults as the index on the X Axis. This would probably just solve it all in one go, and allow for anything to be used as long as Realm can sort it.
The text was updated successfully, but these errors were encountered: