D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
galenburrell
Full window
Github gist
Module 2 Exercise
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Historic Dipsea Results with D3</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> </head> <body> <p>Awesome visualization to come...</p> <script type="text/javascript"> //Load in contents of CSV file d3.csv("dipsea_filtered.csv", function(data) { //Now CSV contents have been transformed into //an array of JSON objects. //Log 'data' to the console, for verification. console.log(data); }); </script> <svg width="500" height="200"> <rect x="40" y="10" width="10" height="100" fill="orange" /> <rect x="52" y="20" width="10" height="90" fill="orange" /> <rect x="64" y="10" width="10" height="100" fill="orange" /> <rect x="76" y="5" width="10" height="105" fill="orange" /> <rect x="88" y="10" width="10" height="100" fill="orange" /> <rect x="100" y="20" width="10" height="90" fill="orange" /> <rect x="112" y="10" width="10" height="100" fill="orange" /> <rect x="124" y="5" width="10" height="105" fill="orange" /> <rect x="136" y="10" width="10" height="100" fill="orange" /> <rect x="148" y="20" width="10" height="90" fill="orange" /> <rect x="160" y="10" width="10" height="100" fill="orange" /> <rect x="172" y="5" width="10" height="105" fill="orange" /> <text x="208" y="100" fill="charcoal" font-size="24" font-weight="bold" font-family="Helvetica">First Bar Chart! :)</text> <line x1="30" y1="110" x2="400" y2="110" stroke="gray" stroke-width="3" /> </svg> </body> </html>
Modified
http://d3js.org/d3.v3.js
to a secure url
https://d3js.org/d3.v3.js