In my bar chart, I am almost finished.
See my CodePen for details.
If I hover over a bar, it won’t always show the tooltip.
The mouseover event handler is added on JavaScript line 56.
I am not 100% certain, but I do believe it worked just before, then I changed something, realised it didn’t work and changed it back, and now I can’t fix it again…
Any help is greatly appreciated!
Thank you in advance,
Thank you, but I’m not sure if that works for me? Hmm…
import * as d3Transition from "https://cdn.skypack.dev/d3-transition@2.0.0";
// Create tooltip
const tooltip = d3.select("body").append("div")
.transition()
.attr("id", "tooltip")
.html("Hello")
Don’t mind the “Hello”, that’s just while I test ofc.
Am I using the transition correctly though? I’ve imported d3-transition using CodePen’s own feature…
Thank you so much!
I made it work now, I think I had misunderstood how and where to use transition…
But thank you, it really helps!
Now I just need to make it pretty before I submit it