Using d3.grid.js
by FernOfTheAndes
by Nivaldo
HTML
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://www.fernoftheandes.com/js/d3.grid.js"></script>
<link rel="stylesheet" href="http://www.fernoftheandes.com/css/d3.grid.css">
<h3>Using d3.grid.js</h3>
<!--
- do a slider for changing magnitude of grid spacing
- offer this feature as background for many kinds of graphs, when it makes sense (challenge will be to keep it on the background because of z-depth problems)
- make this into a bl.ocks.org (could make this into a little plugin)
-->
CSS
.gr-bg {
fill: linen;
}
JavaScript
var svg = d3.select("body").append("svg").attr("height",300).attr("width",400);
drawGrid(svg,40,false);