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.
Kristi,

Thanks so much for looking at this. I changed the code so many times that I got completely confused!

I am not sure if I will have time to look at everything before tonight but I will once I get to the meeting.

Ashleigh

On Aug 6, 2014, at 3:05 PM, Kristi Centinaro <notifications@github.com> wrote:

> In js/main.js:
> 
> > -        .append("g")
> > -        .attr("transform", "translate(" + w / 3 + "," + h / 2 + ")");
> > -
> > -    var drawD3Document = function(data) {
> > -        data.forEach(function(d) {
> > -            d[data] = +d[data];
> > -    });
> > -    var g = svg.selectAll(".arc")
> > -    	    .data(pie(data))
> > -    	    .enter()
> > -    		.append("g")
> > -    		.attr("class", "arc");
> > -
> > -    var count = 0;
> > -
> > -    	g.append("path")
> I think the biggie here was missing the svg: part of svg:path
> 
> —
> Reply to this email directly or view it on GitHub.
>