D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
alina-zhu
Full window
Github gist
geometry
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 canvas = d3.select("body") .append("svg") .attr("width", 960) .attr("height", 500) var circle = canvas.append("circle") .attr("cx", 90) .attr("cy", 90) .attr("r", 50) .attr("fill", 'green'); var rectangle = canvas.append("rect") .attr('width', 20) .attr('height', 20) .attr("fill", "yellow"); var line = canvas.append("line") .attr("x1", 0) .attr("x2", 200) .attr("y1", 100) .attr("y2", 300) .attr("stroke", "blue") .attr("stroke-width", 3) </script> </body>
https://d3js.org/d3.v4.min.js