Visualize Data with a Bar Chart - failing tooltip tests 13&14

Hi, my code is failing both the tooltip tests (13 and 14) and the reasons given are:

  1. the tooltip should be hidden when the mouse is not on an area
  2. could not find property “data-date” in tooltip

Despite this, when I test the visibility of the tooltip myself, it seems to work as expected. For test 14, I tried adding the “data-date” property using tooltip.attr in the mouseover event, I’m not sure why the test cannot find it.

Please help me figure out which part of my code is causing this error.

My code: https://codepen.io/Devi-4/pen/dyBNqWj?editors=0011

Link to the challenge: https://www.freecodecamp.org/learn/data-visualization/data-visualization-projects/visualize-data-with-a-bar-chart

Hello, I put a hyphen in your value in HTML and it passes :grinning:

1 Like