mbostock/d3 — Issue #429: Tiny issue in part bar chart tutorial
Author: joegoggins
Created: 2012-01-03 18:26:36+00:00
State: open

Hi Mike,

Thanks for d3.js and Protovis, these viz toolkits are awesome!

While doing the d3 part-1 tutorial
http://mbostock.github.com/d3/tutorial/bar-1.html
this snippet tripped me up for a second:

"
With the basic chart is in place, you can place additional marks to improve readability. As a first step, pad the SVG container to make space for labels:

1 var chart = d3.select(".content")
2 .append("svg:svg")
3 .attr("class", "chart")
4 .attr("width", 440)
5 .attr("height", 140)
6 .append("svg:g")
7 .attr("transform", "translate(10,15)");

The problem is that the d3.select should reference body, not .content.
Also, the you could also change the preceding text to read "now go modify the first 'var chart = ' declaration" or someting.

to be consistent with the rest of the page it should be:
1 var chart = d3.select("body")
instead of
1 var chart = d3.select(".content")

Just an FYI,

-joe