Permalink
Browse files

Namespaces are optional now!

  • Loading branch information...
1 parent 9523f94 commit 817358a7b270c5fa80a317910eba20ff06555d4e @mbostock mbostock committed Nov 23, 2011
Showing with 7 additions and 7 deletions.
  1. +7 −7 examples/bar/bar.html
View
@@ -52,10 +52,10 @@
var xAxis = d3.svg.axis().scale(x).orient("top").tickSize(-h),
yAxis = d3.svg.axis().scale(y).orient("left").tickSize(0);
-var svg = d3.select("body").append("svg:svg")
+var svg = d3.select("body").append("svg")
.attr("width", w + m[1] + m[3])
.attr("height", h + m[0] + m[2])
- .append("svg:g")
+ .append("g")
.attr("transform", "translate(" + m[3] + "," + m[0] + ")");
d3.csv("sample-data.csv", function(data) {
@@ -70,15 +70,15 @@
var bar = svg.selectAll("g.bar")
.data(data)
- .enter().append("svg:g")
+ .enter().append("g")
.attr("class", "bar")
.attr("transform", function(d) { return "translate(0," + y(d.name) + ")"; });
- bar.append("svg:rect")
+ bar.append("rect")
.attr("width", function(d) { return x(d.value); })
.attr("height", y.rangeBand());
- bar.append("svg:text")
+ bar.append("text")
.attr("class", "value")
.attr("x", function(d) { return x(d.value); })
.attr("y", y.rangeBand() / 2)
@@ -87,11 +87,11 @@
.attr("text-anchor", "end")
.text(function(d) { return format(d.value); });
- svg.append("svg:g")
+ svg.append("g")
.attr("class", "x axis")
.call(xAxis);
- svg.append("svg:g")
+ svg.append("g")
.attr("class", "y axis")
.call(yAxis);
});

0 comments on commit 817358a

Please sign in to comment.