D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
IconicImagery
Full window
Github gist
Doctor Who Deathly Hallows SVG Test
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Doctor Who Earth Time Travel Journeys</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> <style type="text/css"> body { background-color: FFFFFF; font-family: Helvetica Fixed; color: black; } svg { background-color: #FFFFFF; } div { text-align: center; } h1 { text-align: center; } h2 { text-align: center; } p { text-align: center; } p.italic { font-style: italic; font-size: 6; } </style> </head> <body> <h1>Doctor Who Earth Time Travel Journeys</h1> <h2>Hartnell (DW1) through Smith (DW11)</h2> <p>This is a test page to create an SVG image and upload my Doctor Who CSV data using D3</p> <p class="italic">pssst.....look in the console (not the one in the Tardis!)</p> <div style="text-align:center;"> <svg width="500" height="400"> <!-- Harry Potter Deathly Hallows Symbol --> <polygon points="250 0,150 200,350 200" style="fill:white;stroke:purple;stroke-width:3" /> <circle cx="250" cy="138" r="60" stroke="purple" stroke-width="3" fill="white" /> <line x1="250" y1="0" x2="250" y2="200" stroke="purple" stroke-width="3" /> </svg> <script type="text/javascript"> //Load in contents of CSV file d3.csv("Doctor Who EARTH Time Travel Journeys_LE.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