D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
amerval
Full window
Github gist
Assignment module 2
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Exercise Module 2</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> <style type="text/css"> body { font-family: Lucida sans; background-color: #EEEEEE; padding: 50px; } p { font-size: 14px; line-height: 18px; padding: 30px; } svg { background-color: white; } </style> </head> <body> <p>Here is my beautiful SVG</p> <svg width="300" height="300"> <circle cx="150" cy="150" r=50 fill="#EEEEEE" /> <circle cx="54.9" cy="119.1" r=40 fill="#333333" opacity=0.6 /> <circle cx="91.2" cy="230.9" r=40 fill="#663333" opacity=0.6 /> <circle cx="208.8" cy="230.9" r=40 fill="#993333" opacity=0.6 /> <circle cx="245.1" cy="119.1" r=40 fill="#CC3333" opacity=0.6 /> <circle cx="150" cy="50" r=40 fill="#FF3333" opacity=0.6 /> </svg> <script type="text/javascript"> //Load in contents of CSV file d3.csv("top1perc_transpose.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