D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
jamazel
Full window
Github gist
Global variable test
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Global variable test</title> <script src="https://d3js.org/d3.v3.min.js" charset="utf-8"></script> <style type="text/css"> body { background-color: #fff1e0; } #chart { background-color: #fff; } svg { display:block; margin: auto; } </style> </head> <body> <div id="main-content"> <h1>Arts Council grant funding in England</h1> <h3>2012-13 (£)</h3> <p>Check out the console</p> <div id="chart"></div> </div> <script type="text/javascript"> var dataset={}; d3.csv("artsCouncil.csv", function(data) { console.log("Loaded data= ",data); dataset=data.map(function(d) {return d}); }); console.log("dataset=", dataset) </script>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js