D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
perrychu
Full window
Github gist
bubbles - TSA claims by airport
Built with
blockbuilder.org
<!DOCTYPE html> <svg width="960" height="960" font-family="sans-serif" font-size="10" text-anchor="middle"></svg> https://medium.freecodecamp.org/a-gentle-introduction-to-d3-how-to-build-a-reusable-bubble-chart-9106dc4f6c46 https://bl.ocks.org/mbostock/4063530 <script src="https://d3js.org/d3.v4.min.js"></script> <script> var bubbleChart = function () { var width = 600 height = 400; function chart(selection){ // we gonna get here } chart.width = function(value) { if (!arguments.length) { return width; } width = value; return chart; } chart.height = function(value) { if (!arguments.length) { return height; } height = value; return chart; } return chart; } var chart = bubbleChart().width(300).height(200); d3.csv('medium_january.csv', function(error, our_data) { if (error) { console.error('Error getting or parsing the data.'); throw error; } var chart = bubbleChart().width(600).height(400); d3.select('#chart').data(our_data).call(chart); }); </script>
https://d3js.org/d3.v4.min.js