simplest d3 + meteor example I could make v2
steve/simple-d3-with-meteor · GitHub.
Learning meteor & d3 together – I wanted a simple example to build on. Since I didn’t find one, I’m sharing this. The minimal (for me) was that it took advantage of the reactive data synced between client & server to affect something I drew with d3.
Now, individual circles are drawn by d3 (via a template), each one as a result of individual record changes managed by Meteor. This is more like what (I think) Meteor intended, as it’s much closer to how HTML is created by Meteor templates. One difference, the removal of something from d3 is triggered by use of a callback from observing the Things collection.
- Add & remove records in “Things” collection using the “+” and “-” buttons
- Each record in the “Things” collection will be shown as a circle, with the “name” attribute as the text inside of the circle.
Leave a Reply