D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
chiaochi
Full window
Github gist
[Data Visualization and Infographics with D3] Module 2
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>D3 with SVG Elements</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="400" height="600"> <rect x="190" y="5" width="20" rx="5" ry="5" height="30" fill="gold" stroke="black"/> <polygon fill="gold" stroke="black" points="190,35 210,35, 215,40 185,40" /> <polygon fill="gold" stroke="black" points="170,40 230,40 220,100 180,100" /> <rect x="185" y="100" width="30" height="40" fill="gold" stroke="black" /> <rect x="187" y="140" width="26" height="40" fill="gold" stroke="black" /> <polygon fill="gold" stroke="black" points="187,180 213,180 218,185 182,185" /> <rect x="160" y="185" height="10" width="80" fill="gold" stroke="black"/> <rect x="150" y="195" height="30" width="100" fill="black" /> </svg> <script type="text/javascript"> d3.csv("Oscar Winner.csv", function(data) { console.log(data); }); </script> </body> </html>
Modified
http://d3js.org/d3.v3.js
to a secure url
https://d3js.org/d3.v3.js