D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
vicapow
Full window
Github gist
the simplest pie chart example
<!DOCTYPE html> <html> <body> <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script> <script> var vis = d3.select('body').append('svg').append('g') .attr('transform', 'translate(200,200)') , color = d3.scale.category10() , arc = d3.svg.arc().outerRadius(100).innerRadius(0) , pie = d3.layout.pie() , arcs = vis.selectAll('path').data(pie([4,5,6])) .enter().append('path').attr({ d: arc, fill: function(d, i){ return color(i) }, stroke: 'white' }) </script> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js