D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
mbostock
Full window
Github gist
Wind
<!DOCTYPE html> <meta charset="utf-8"> <style> circle { fill: none; stroke: #000; stroke-opacity: .1; } </style> <body> <script src="//d3js.org/d3.v3.min.js"></script> <script> var width = 960, height = 500; var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height) .append("g") .attr("transform", "translate(" + width / 2 + "," + height / 2 + ")"); d3.json("readme.json", function(error, wind) { if (error) throw error; svg.selectAll("circle") .data(wind) .enter().append("circle") .attr("transform", function(d) { return "rotate(" + (180 + (d[1] + 10 * (Math.random() - .5))) + ")" + "translate(0," + Math.max(0, d[2] + 2 * (Math.random() - .5)) * 10 + ")"; }) .attr("r", 4); }); </script>
https://d3js.org/d3.v3.min.js