D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
ingating
Full window
Github gist
Causes of death with SVG art
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Cause of death data and amazing SVG</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> <style type="text/css"> body { background-color: #ddddff; } svg { background-color: white; } </style> </head> <body> <svg width="620" height="800"> <text x="220" y="780" fill="rgba(125,125,125,0.5)" font-size="80" font-family="Helvetica">at its finest</text> <circle cx="500" cy="300" r="200" fill="#BA141A" stroke="#4D94B1" stroke-width="50"/> <ellipse cx="180" cy="500" rx="100" ry="200" fill="black" stroke="#D2AA56" stroke-width="20"/> <line x1="0" y1="0" x2="709" y2="600" stroke="#BA141A" stroke-width="25"/> <text x="10" y="100" fill="grey" font-size="110" font-weight="bold" font-family="Helvetica">Modern art</text> </svg> <script type="text/javascript"> // Your D3 code will go here //Load in contents of CSV file d3.csv("AIHW_Causes-of-death_1907-2012.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