Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bring bundle example up-to-date

  • Loading branch information...
commit 14bd4fb5c50d84a744d0a5fb60c902ade7396696 1 parent 95c3c0b
@kitmonisit authored
Showing with 7 additions and 7 deletions.
  1. +7 −7 examples/bundle/bundle-treemap.js
View
14 examples/bundle/bundle-treemap.js
@@ -1,18 +1,18 @@
-var w = 960,
- h = 500,
+var width = 960,
+ height = 500,
fill = d3.scale.ordinal().range(colorbrewer.Greys[9].slice(1, 4)),
stroke = d3.scale.linear().domain([0, 1e4]).range(["brown", "steelblue"]);
var treemap = d3.layout.treemap()
- .size([w, h])
+ .size([width, height])
.value(function(d) { return d.size; });
var bundle = d3.layout.bundle();
var div = d3.select("#chart").append("div")
.style("position", "relative")
- .style("width", w + "px")
- .style("height", h + "px");
+ .style("width", width + "px")
+ .style("height", height + "px");
var line = d3.svg.line()
.interpolate("bundle")
@@ -33,8 +33,8 @@ d3.json("../data/flare-imports.json", function(classes) {
.text(function(d) { return d.children ? null : d.key; });
div.append("svg")
- .attr("width", w)
- .attr("height", h)
+ .attr("width", width)
+ .attr("height", height)
.style("position", "absolute")
.selectAll("path.link")
.data(bundle(links))
Please sign in to comment.
Something went wrong with that request. Please try again.