D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
aaizemberg
Full window
Github gist
vector --> "html table" using d3.js
<!DOCTYPE html> <html> <head> <script src="https://d3js.org/d3.v3.min.js"></script> <meta charset="utf-8"> <title>tablas desde d3.js</title> <style> table, td, th { border:1px solid green; } th { background-color:green; color:white; } </style> </head> <body> <script> var vector = [44,33,22,11]; var table = d3.select("body").append("table"); table.append("tr").append("th").text("tÃtulo"); table.selectAll("tr") // .data(vector) .data(vector, function(d) {return d;} ) .enter() .append("tr") .append("td") .text(function(d) { return d; }); </script> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js