D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
jaegerka
Full window
Github gist
Question 13: Kaleigh Jaeger
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> var svg = d3.select("body").append("svg") .attr("width", 5000) .attr("height", 2500) var rect = svg.append("rect") .attr("x", 50) .attr("y", 25) .attr("height", 200) .attr("width", 100) .style("fill", '#0055A4'); var rect = svg.append("rect") .attr("x", 150) .attr("y", 25) .attr("height", 200) .attr("width", 100) .style("fill", '#FFFFFF'); var rect = svg.append("rect") .attr("x", 250) .attr("y", 25) .attr("height", 200) .attr("width", 100) .style("fill", '#EF4135'); </script> </body>
https://d3js.org/d3.v4.min.js