D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
thomaxyu001
Full window
Github gist
fresh block_1
Built with
blockbuilder.org
<!DOCTYPE html> <html lang="en"> <head> <title>I'm Learning D3</title> <!-- You will load the D3 library here. --> <script src="https://d3js.org/d3.v4.js" charset="utf-8"></script> </head> <body> <!-- Page elements and content go here. --> <svg width="160" height="180"> <rect x="30" width="20" fill="steelblue"></rect> <rect x="55" width="20" fill="steelblue"></rect> <rect x="80" width="20" fill="steelblue"></rect> <rect x="105" width="20" fill="steelblue"></rect> </svg> <script> <!-- Our D3 code will go here. --> var ratData = [40,90,30,60]; d3.selectAll("rect") .data(ratData) .attr("height",function(d){ return d; }); </script> </body> </html>
https://d3js.org/d3.v4.js