Code Monkey home page Code Monkey logo

Comments (11)

MaxHasADHD avatar MaxHasADHD commented on June 28, 2024

I would be interested in this as well

from charts.

liuxuan30 avatar liuxuan30 commented on June 28, 2024

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.

from charts.

danielgindi avatar danielgindi commented on June 28, 2024

@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 customMinY/customMaxY as well)

from charts.

dxclancy avatar dxclancy commented on June 28, 2024

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!

from charts.

dxclancy avatar dxclancy commented on June 28, 2024

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.

from charts.

danielgindi avatar danielgindi commented on June 28, 2024

Currently there's no such support- but I'll try to design something asap :)

from charts.

danielgindi avatar danielgindi commented on June 28, 2024

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.

from charts.

dxclancy avatar dxclancy commented on June 28, 2024

Can you point to the appropriate class?

from charts.

liuxuan30 avatar liuxuan30 commented on June 28, 2024

@dxclancy check out the data interfaces and the realm data implementations for reference

from charts.

dxclancy avatar dxclancy commented on June 28, 2024

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. ?

from charts.

liuxuan30 avatar liuxuan30 commented on June 28, 2024

@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?
Right now the design is the chart will draw whatever you feed in. you give N data, it draw N line dots.
Chart only read data from data sets, and it's your freedom to put whatever data is into the set.

from charts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.