D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
trinary
Full window
Github gist
dots
Built with
blockbuilder.org
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://cdnjs.cloudflare.com/ajax/libs/d3/4.7.4/d3.min.js"></script> <style> body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } svg { width:100%; height: 100% } </style> </head> <body> <svg></svg> <script> var myData = [1, 2, 4, 11, 5.5, 6]; var svg = d3.select("svg") var circles = svg.selectAll("circle").data(myData); circles .enter() .append("circle") .attr("cx", function(d) { return d * 50}) .attr("cy", 111) .attr("r", 10) .style("fill", "#9C9393") .style("stroke", "#D8A3A3") .style("stroke-width", "2px"); </script> </body>
https://cdnjs.cloudflare.com/ajax/libs/d3/4.7.4/d3.min.js