D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
wykhuh
Full window
Github gist
week 3: National parks visitor count bar chart
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Document</title> <script src="https://d3js.org/d3.v3.min.js" ></script> <style> </style> </head> <body> <script src="barChart.js"></script> <script> (function(Chart){ var options = { width: 1000, height: 3750, barPadding: 1, factor: 15100 }; var chart = Chart(); chart.init(options); chart.createSVG(); d3.csv('parks.csv', function(data){ var rects = chart.appendElements(data, 'rect'); chart.drawElements(rects, 'visitors'); chart.addToolTip(rects, 'park', 'visitors'); }); }(Chart)); </script> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js