Hello all,
I’m working on the Bar Chart project.
I’m passing all of the tests except for user story #13. I’m not entirely sure what that requirement is wanting, but I think I have it? Here is a link to my CodePen. What I think are relevant snippets are below. Let me know what I’m doing wrong, and any advice, even if unrelated.
var tooltip = d3.tip()
.attr(“id”, “tooltip”)
.html((d, i)=>“Date: “+d[0]+”, GDP: $”+d[1].toFixed(0)+" billion")
.attr(“data-date”, (d,i)=>dataset[i][0])
svg.call(tooltip)
svg.selectAll(“rect”)
…
.on(“mouseover”, tooltip.show)
.on(“mouseout”, tooltip.hide)