Skip to content

Instantly share code, notes, and snippets.

@RobinL
Created December 15, 2016 20:24
Show Gist options
  • Select an option

  • Save RobinL/fb951595e325f3b9cf0ff6fbd3383369 to your computer and use it in GitHub Desktop.

Select an option

Save RobinL/fb951595e325f3b9cf0ff6fbd3383369 to your computer and use it in GitHub Desktop.
fresh block
license: mit
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
</style>
</head>
<body>
<table>
<thead>
<tr><td> A</td><td> B</td><td> C</td><td> D</td></tr>
</thead>
<tbody>
<tr><td> 0</td><td> 1</td><td> 2</td><td> 3</td></tr>
<tr><td> 4</td><td> 5</td><td> 6</td><td> 7</td></tr>
<tr><td> 8</td><td> 9</td><td> 10</td><td> 11</td></tr>
<tr><td> 12</td><td> 13</td><td> 14</td><td> 15</td></tr>
</tbody>
</table>
<script>
// Feel free to change or delete any of the code you see in this editor!
var svg = d3.select("body").append("svg")
.attr("width", 960)
.attr("height", 500)
var td = d3.select("tbody").selectAll("td");
var td_g = d3.selectAll("tbody tr").selectAll("td");
td_g.html(function(d) {a = d; debugger;})
debugger;
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment