D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
mbostock
Full window
Github gist
Parent Data
A test of hierarchical selections and parent data, features in development for D3 4.0.
<!DOCTYPE html> <meta charset="utf-8"> <style> td { border: solid 1px #ccc; padding: 10px; } table { margin: 10px; border-spacing: 0; border-collapse: collapse; } </style> <body> <script src="d3-selection.min.js"></script> <script> d3.select("body") .append("table") .selectAll("tr") .data(["y" + 0, "y" + 1, "y" + 2]) .enter().append("tr") .selectAll("td") .data(["x" + 0, "x" + 1, "x" + 2]) .enter().append("td") .text(function(x, i, y, j) { return [x, y]; }); </script>