D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
piggysmacks
Full window
Github gist
Canadian RRSP Contributions
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Loading CSV Data with D3</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> </head> <body> <p>Not much to see here, besides this awesome svg Canadian flag; try looking in the console!</p> <svg width="500" height="400" background="red"> <line x1="163.5" y1="110" x2="163.5" y2="140" stroke="#f00" stroke-width="3" /> <rect width="70" height="162" style="fill:rgb(255,0,0)"/> <polygon points="131.5,115 135.5,107.5 108.5,87.5 118.5,85 113.5,67.5 128.5,70 131,60 153.5,85 141,45 153.5,52.5 163.5,30 172.25,52.5 186,45 173.5,85 196,60 198.5,70 213.5,67.5 208.5,85 218.5,87.5 191.5,107.5 195.5,115 163.5,110 131.5,115" stroke="#f00" stroke-width="7" fill="#F00" /> <rect x="257" y="0" width="70" height="162" style="fill:rgb(255,0,0)"/> <text x="0" y="210" fill="charcoal" font-size="34" font-weight="bold" font-family="Helvetica">Please bring Spring!</text> </svg> <script type="text/javascript"> //Load in contents of CSV file d3.csv("RRSP.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> </body> </html>
Modified
http://d3js.org/d3.v3.js
to a secure url
https://d3js.org/d3.v3.js