dynamic data and dc.js

90 views
Skip to first unread message

BALAJI VEERARAGHAVAN

unread,
Jul 10, 2015, 5:18:44 AM7/10/15
to dc-js-us...@googlegroups.com
Hi Folks,

I have 3 dc.js charts on my page. I would like to make the data it consumes as dynamic as concurrent users might range from 5 to 15 users. If I use .CSV and .JSON, the physical file needs to be created on server and concurrency would be an issue. Is there a way to pass in-memory data to d3.js for rendering the charts? Any example/help is appreciated.

Thanks
BV

Gordon Woodhull

unread,
Jul 10, 2015, 10:52:39 AM7/10/15
to dc-js-us...@googlegroups.com
As commented on stack overflow, I think this is really a question about how you structure your server. 

Rather than serving static files, you probably want to generate the data per client, still formatting it as csv or json before sending it to the client, but not saving it to disk.

--
You received this message because you are subscribed to the Google Groups "dc-js user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dc-js-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/a3f82a68-85c3-40d0-8629-c43c9909e2aa%40googlegroups.com.

Adam Reynolds

unread,
Jul 10, 2015, 11:00:56 AM7/10/15
to dc-js-us...@googlegroups.com
Functionally, d3 is only providing you with the tools to retrieve data and process it into an array of objects (with time functions) which you then apply crossfilter to.

How you generate and regenerate that array and in turn re-apply your crossfilter dimensions is down to you.

I've used crossfilter to generate another array to feed that into a secondary set of charts. In effect a summary row of charts, with a different data analysis underneath it.

Also the path specified in d3.csv is a URL, that is, you could point it at a data store that is pushing out CSV data.


Reply all
Reply to author
Forward
0 new messages