D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
ritacorreia1976
Full window
Github gist
Module 2 exercises
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>SVG Example</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> <style type="text/css"> body { background-color: grey; } svg { background-color: white; } </style> </head> <body> <p>Bear</p> <svg width="640" height="380" > <circle cx="300" cy="140" r="50" fill="brown" /> <circle cx="320" cy="100" r="25" fill="brown" /> <circle cx="280" cy="100" r="20" fill="brown" /> <circle cx="280" cy="130" r="5" fill="black" /> <circle cx="320" cy="130" r="5" fill="black" /> <circle cx="300" cy="140" r="5" fill="black" /> <rect x="285" y="155" width="30" height="6" fill="orange" /> <text x="240" y="230" font-family="Helvetica, Arial, sans-serif" font-size="30" fill="grey" >I am a bear</text> </svg> <script type="text/javascript"> // Loading my data to the console d3.csv("googlerequests.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