Creating dynamic graphs for Data Analytics: is AngularJS the right choice?
4,087 views
Skip to first unread message
Alec Taylor
unread,
May 1, 2013, 12:17:48 PM5/1/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
Recently I have begun using Google AngularJS to consume my
Python-built RESTful JSON-talking API.
However I have a Data Analytics project which will require dynamic
graphs of all sorts,
e.g.: pie, line, plot, node-link[1], polar graphs[2] and those
big-data graphs showing interconnections + having node diameter
related to its relative value[3].
I will also have a <table> showing record and/or aggregate level
information and search functionality.
(this is a not-for-profit project FYI)
Would AngularJS be the right choice for this project, or would you
recommend combining it with another framework? - If so, which
framework/library?
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
I'm currently using Angular with D3. Being able to create a chart directives is pretty sweet:
<pie-chart ng-model="my_source"> Then using the two-way data binding, changing your dataset can have really nice animations directly in your charts. Makes for a very slick interface.
To do the actual charting I'm using D3. Bit of a learning curve, but great tool:
There are tools built on top of d3 which could give you a head start. A quick search will reveal others. Millage my vary with these and I personally haven't used any of them.
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
Hi Owen!
I'm also using d3 and Angular and having a good time with it so far. As of late I'm running into a bit of a roadblock with d3 Treemaps in particular that I haven't hit with the usual bar/pie/line charts. Specifically, I'm trying to 2 way bind the model in my treemap directive via scope { treeData: '=' }. As the model changes propagate with subsequent Ajax calls, something is getting screwed up... d3's selections aren't noticing the change in the data the way they usually do.
A wild guess has me thinking that because d3's treemap.nodes() method modifies the object directly that theres some changes not digesting properly. Have you had any luck with treemaps?
Owen M
unread,
May 3, 2013, 1:44:08 PM5/3/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
I could be doing this very wrong, but here is the directive I've setup for doing charting with d3. Bunch of stuff chopped out for brevity:
Biggest thing is setting up a watch on chart_queries and passing `true` as the last parameter to "compare object for equality rather than for reference." So if something changes deep in your query data structure, the watch will be triggered and your chart will update.
I don't have any personal experience with Treemaps but hopefully something in there helps.