D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
mforando
Full window
Github gist
Rotation Example
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 svg = d3.select("body").append("svg") .attr("width", 300) .attr("height", 300) .style("margin",200) .style("overflow","visible") .style("border","1px solid black") svg.append("text") .attr("transform","rotate(45) translate(50,50)") .text("translate(50,50)") .attr("y", 0) .attr("x", 0) .attr("font-size", 16) .attr("font-family", "monospace") .attr("fill", "red") svg.append("text") .text("(x=50,y=50)") .attr("transform","rotate(45))") .attr("y", 50) .attr("x", 50) .attr("font-size", 16) .attr("font-family", "monospace") svg.append("circle") .attr("transform","rotate(45) translate(50,50)") .attr("cy", 0) .attr("cx", 0) .attr("r", 3) .attr("fill", "red") svg.append("circle") .attr("transform","rotate(45))") .attr("cy", 50) .attr("cx", 50) .attr("r", 3) .attr("fill", "black") </script> </body>
https://d3js.org/d3.v4.min.js