D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
giguerre
Full window
Github gist
2 block
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> // d3.select("#chart1") // .append("svg") //.attr("width" , -52) // .attr("height",0 // ) function create_scatterplot( el, data, var_x, var_y , size) { el .append("svg") .attr("width",100) .attr("height",200) } create_scatterplot(d3.select("#chart1")); create_scatterplot(d3.select("#chart2")); // add // add a scatter plot to a division </script> </body>
https://d3js.org/d3.v4.min.js