On Saturday, October 1, 2016 at 11:43:39 AM UTC+2, srinivas jayaram wrote: > > > I have a chart on my dashboard, I need to connect this chart to the DB > using Angular JS inorder to populate the results. Looking forward for a > solution. >
Typically your Angular part of the application will have a few components to handle this. You'll have something like a "d*ataService*", an angular service that gets your data from wherever it resides (you say DB, but I assume there's also a backend application fetching from that DB?). So, some service that will expose a, say, *get* method, which basically returns the data from server and optionally transforms it if you need that part. Depending on which angular version you use, this service can look one way or another, but it will use angular's *$http* or *Http* service to fetch data. Then you'll have a component or a directive that draws the graph. It will probably first fetch the data, then when it's in, it will populate the relevant HTML nodes. I assume you use a chart library, so if it's an angular-wrapped thing you'll pass the data there, and if not, you'll now have to call this third-party chart library. Alternatively you might want to draw your own chart. If you have more specific examples - what have you done, what exactly is the problem - somebody might help out more. -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
