D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
1wheel
Full window
Github gist
hex-circle
<!DOCTYPE html> <meta charset="utf-8"> <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script> <style> circle{ fill: steelblue; } </style> <body></body> <script> var width = 400, height = 400; var svg = d3.select('body').append('svg') .attr('width', width) .attr('height', height) .append('g') .attr('transform', 'translate(' + width/2 + ',' + height/2 + ')'); var points = 6; svg.selectAll('circle') .data(d3.range(points)).enter() .append('g') .attr('transform', function(d, i){ return 'rotate(' + i*360/points + ') ' + 'translate(' + 100 + ')'; }) .append('circle') .attr('r', 10); </script>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js