D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
tejaser
Full window
Github gist
working with json
Built with
blockbuilder.org
<!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> <script> // Feel free to change or delete any of the code you see in this editor! // var somePeople = [{name: "Peter", age: 27}, {name: "Sulayman", age: 24}, // {name: "K.C.", age: 49}]; someNumbers = [17, 82, 9, 500, 40]; someColors = ["blue", "red", "chartreuse", "orange"]; smallerNumbers = someNumbers.filter(function(d) {return d <= 40}); d3.select("body").selectAll("div") .data(smallerNumbers) .enter() .append("div") .html(function (d) {return d}); </script> </body>
https://d3js.org/d3.v4.min.js