I'm working with two pieces of D3.js code to draw charts. The first piece sets the width, height, and margins like this:
<script>
var margin = {top: 20, right: 20, bottom: 30, left: 40},
width = 960 - margin.left - margin.right,
height = 500 - margin.top - margin.bottom;
It displays perfectly on the page. Specifically, the script tag is sourced from here: https://github.com/mhemesath/r2d3/blob/master/examples/scatterplot/scatterplot.html
Then, I include another piece of D3.js code for a bar chart, setting its width, height, etc., as follows:
<script type="text/javascript>
//Width and height
var w = 500;
var h = 100;
var barPadding = 1;
Specifically, the script tag is sourced from here:
How can I prevent these two charts from overlapping? I want the first one to display first and then have the second one appear below it...