D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
ThomasSeymat
Full window
Github gist
Block Green Energy EU
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Module 2 exercice</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> </head> <body> <h3>This is my SVG image</h3> <svg width="600" height="480"> <circle cx="300" cy="140" r="200" fill="pink" /> <line x1="20" y1="10" x2="25" y2="190" stroke="orange" stroke-width="3" /> <line x1="25" y1="10" x2="30" y2="190" stroke="orange" stroke-width="3" /> <line x1="30" y1="10" x2="35" y2="190" stroke="orange" stroke-width="3" /> <line x1="50" y1="50" x2="75" y2="190" stroke="blue" stroke-width="3" /> <line x1="55" y1="50" x2="280" y2="290" stroke="blue" stroke-width="3" /> <line x1="60" y1="50" x2="85" y2="190" stroke="blue" stroke-width="8" /> <rect x="200" y="10" width="400" height="25" fill="red" /> <text x="208" y="160" fill="navy" font-size="38" font-weight="bold" font-family="Helvetica">Random Latin Text</text> </svg> <script type="text/javascript"> //Load in contents of CSV file d3.csv("GreenEnergyEU.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