mbostock/d3 — Issue #565: Update examples to use current best practices.
Author: mbostock
Created: 2012-02-23 02:12:01+00:00
State: open
Labels: docs

For example, this:

```js
var margin = {top: 0, right: 0, bottom: 0, left: 0},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;

var svg = d3.select("body").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g")
.attr("transform", "translate(" + margin.left + "," + margin.top + ")");
```