-
-
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
Core Data interfacing? #15
Comments
I would be interested in this as well |
I am not sure if I understand correctly, but I think charting is just how you draw the lines and shapes, they have no knowledge and shouldn't have as well where your data comes from. It's every controller's work to fetch the data needed and feed the chart library. |
@liuxuan30 that's correct. I can't imagine a situation where you would want the chart to pull data from Core Data or any other. But maybe one of these guys can explain the source for the need. Maybe you require some sort of a "virtual chart" where you want a scrollable chart that "pulls" the data through a delegate as you scroll? (Even then it's a complicated issue, as the chart needs to know how many values there are so it knows how much scrolling, similarly to UITableView, and you would need to use |
Correct. UITableView is analgous, in that you can use it to pull data from a source versus pushing all the data into it. NSFetchedResultsController is an example of how you can bind a uitableview datasource to a core data query. Knowing how many values there are is not an issue. This is knowable via a query as well. When mentioning core data above, i wasn't saying it should be directly interfacing with it. As an example I'm saying a typical source of data on iOS IS core data, and as such you may be pulling data from a large database which you'd rather not populate the entire data from. This will be a common use pattern for some clients of these charts. I believe Core Plot handles this via binding to NSArrayController interfaces which in turn you can bind to Core data. I'm not overly familiar with Core Plot because seeing this library has diverted my attention from it! I was just being a bit lazy and wondering if IOSCharts has a similar ability already built in, and if you could point me at it instead of me casting about for it. :) Thanks! |
I took a quick look at the StackedBarChart. It looks like to me that chart views require a ChartData object which is essentially all the various data packed up. So my guess would be there isn't currently support for a UITableViewDataSource like interface for lazily pulling data. |
Currently there's no such support- but I'll try to design something asap :) |
There's support for dynamic interfaces for a while now. Anyone can bind to core data or any other data source, and there was no activity on this post for quite a while now, so I'll consider this as resolved. |
Can you point to the appropriate class? |
@dxclancy check out the data interfaces and the realm data implementations for reference |
So I'm looking at the realm demo, specifically Real Line Chart. It gets all the data in the database and sets it all at once. This doesn't seem to be an example of the type this issue raised. ? |
@dxclancy this is an old issue, but Daniel closed it because we now have interaces for CoreData, that's the title of this issue, and it can be closed, right? |
This looks great. Is there support for interfacing with core data such that not all data needs to be pushed into the chart but can be pulled as needed?
Perhaps you could point me to the proper API.
Thanks!
The text was updated successfully, but these errors were encountered: