I’m having issues with three things here.
- I’m doing something wrong to set the height of the bars (the problem might be with
scaleFactorY
in my code). The bottom of the bars goes beneath the x-axis for some reason, but I don’t understand why. - I can’t figure out how to get the x-axis ticks to be the right values. The d3js docs are opaque to my beginner eyes.
- I don’t understand what the test suite wants for a tooltip. If I use
append("title").attr("id","tooltip")
, then I can’t figure out how to get an individual tooltip to show and all the others to hide. (I’d useattr("id", (d, i) => "tooltip" + i)
but that’s not what the test suite wants ig.) If I instead use a separate<div id="tooltip"></div>
explicitly declared in HTML and update it whenever the mouse moves (using a trick to grab the element that the mouse is over), the test suite doesn’t think the element is visible and invisible at the right times, even though manual testing confirms that it is.
Apologies for the novel… any ideas to help me get unstuck?