D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
rayeip
Full window
Github gist
People's House Test
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>The People's House</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> <style type="text/css"> body { background-color: rgb(129, 181, 188); } svg { background-color: rgb(235, 239, 246); } </style> </head> <body> <center><svg width="400" height="300"> <circle cx="200" cy="150" r="25" fill="rgb(135, 138, 135)" /> <line x1="100" y1="120" x2="300" y2="120" stroke="rgb(190, 29, 24)" stroke-width="10" transform="rotate (15 200 150)" /> <rect x="275" y="114" width="20" height="20" fill="rgb(129, 181, 188)" transform="rotate (15 275 115)" /> <rect x="0" y="260" width="400" height="40" fill="gray" /> <text x="200" y="290" fill="white" font-size="32" font-family="Georgia, Times New Roman, serif">BALANCE</text> </svg></center> <script type="text/javascript"> //Load in contents of CSV file d3.csv("CDdemographics.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