I have two histograms with .on("mouseover") listeners. Each is bound to a unique div id. For some reason they plot on the same SVG element.
I've tried to follow the pattern from "D3 Tips and Tricks" ...
<div id="Dx"></div>
<script src="Dx.js" type="text/javascript"></script>
<div id="Cpt"></div>
<script src="Cpt.js" type="text/javascript"></script>
The code for the "Dx.js" chart is very similar to the "Cpt.js" chart.
I define the svg container and append to my unique div ID with
var svg = d3.select("#Cpt").append("svg")
later I svg.selectAll("#Cpt.bar")
before data(data).enter().append("rect")
.
Can anyone help me understand what I'm doing wrong?
})();`.
– Lars Kotthoff Jan 05 '14 at 18:06