D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
javierantuna
Full window
Github gist
template
Built with
blockbuilder.org
<!DOCTYPE html> <head> <meta charset="utf-8"> <script src="https://d3js.org/d3.v4.min.js"></script> <style> body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } </style> </head> <body> <div> <div id="chart1" style="background-color: red; width: 40%; height:200px; display: inline-block"></div> <div id="chart2" style="background-color: blue; width: 40%; height:200px; display: inline-block"></div> </div> <script> function create_scatterplot(el, data, var_x, var_y, var_r, size) { el .append("svg") .attr("width", 100) .attr("height", 200) } create_scatterplot(d3.select("#chart1")); //, data, var_x, var_y, var_r, size) create_scatterplot(d3.select("#chart2")); //, data, var_x, var_y, var_r, size) </script> </body>
https://d3js.org/d3.v4.min.js