Visualize Data with a Heat Map

I need help debugging my code please.
I’m passing all but one test.
Though the tooltip doesn’t appear it passes the test. It would be nice to know how to fix that as well.

When I ran the test on your page I got two tests failing.

One was that your months don’t line up. It should have Jan at the top, but for some reason yours had Dec at the top, then Jan thru Nov. Something must be wrong with how you’re assigning your months.

Second was about displaying your tooltip. Reviewing your tooltip I noticed you don’t do any positioning. You create a Tooltip, but don’t position it on the screen. If you want it to pop up near the cell you’d need to set the x and y of the tooltip (with Absolute, top and left), and then transition the opacity. Also, I don’t see that you assign any HTML to your Tooltip. You add the year data element, but you haven’t put anything into your Tooltip div, and an empty div doesn’t show up in HTML unless you specifically set a width and a height. You’ll need to assign what data you want to show in your tooltip in innerHTML or textContent.

Hope that helps.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.