[okfn-labs] Fwd: [backbonejs] Example of using d3.js and backbone together
elf Pavlik
perpetual-tripper at wwelves.org
Mon Jul 2 23:37:35 UTC 2012
demo dashboard at: http://research.odesk.com/visualizations/country-dashboard/#/home
--- Begin forwarded message from Zack Maril ---
From: Zack Maril <thewitzbold at gmail.com>
To: backbonejs <backbonejs at googlegroups.com>
Date: Mon, 02 Jul 2012 15:38:00 +0000
Subject: [backbonejs] Example of using d3.js and backbone together
Howdy,
A major project of mine has just been released (open sourced) that uses
backbone and d3:
https://www.odesk.com/blog/2012/07/visualizationsoftheoconomy/
I listed some of the key features over on the d3 mailing list<https://groups.google.com/forum/?fromgroups#!topic/d3-js/I2a7AxbVOQs>,
and there was one that might be interesting to people here.
* And, finally, linkable state (via backbone)
https://github.com/johnjosephhorton/gg2d3/blob/master/country-dashboard/js/index.coffee
This is a pretty standard implementation of using backbone's router. Each
"page" has it's own link, both with and without arguments. If it has
arguments, then the variables are reset before everything gets drawn and
updated. Note that this allows for both linkable state and for the use of
the back button to switch between graphics.
Backbone was introduced in the middle of the project, so it isn't
completely leveraged within the code yet. I have ideas for how to use views
and routers combined, but I haven't gotten around to implementing them yet.
Hopefully, next time.
-Zack
--- End forwarded message ---
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/okfn-labs/attachments/20120702/270d91f7/attachment-0003.html>
More information about the okfn-labs
mailing list