arespicio/d3test — pull request #1 by tnbKristi (2014-08-06 19:01:24+00:00)
Title: Code Surgery! :)

So I did a bit of reworking here which makes this diff look a little crazy.

The core of the issue appeared to be the use of `d[name]` or `d[data]` instead of using `d.name` or `d.revenue`.

There's basically two ways to reference an object's attributes: `object.value` and `object["value"]`
The latter approach allows you to replace the string "name" of the object's attribute with a variable, super useful if you don't know what the name is at that time. In our case, though, we know what the data attributes are and so we can reference them with `.` notation: `object.value`

Hope this helps! I commented out the labeling/text bits for now, let's work on that tonight.