what's next?

v2 of simple d3 with Meteor – now rendering individual records

In Uncategorized on June 8, 2013 at 3:17 pm

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.

screenshot

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: