Bar Chart Project - not passing last two tests

Hi all.
I’m trying to finish my Visualize Data with a Bar Chart Project.
My code seems good for me but Idk why I don’t pass the following tests related to the tooltip

  • User Story #12: I can mouse over an area and see a tooltip with a corresponding id="tooltip" which displays more information about the area.
  • User Story #13: My tooltip should have a data-date property that corresponds to the data-date of the active area.

Here is a link to codepen

I would appreciate any help.
Thanks in advance

1 Like

It looks like your tooltip is appended to the last bar on your chart. The tooltip is going to be a floating div or text that appears when you hover over the bars and displays the data for that bar. This article might help you with tooltips.

1 Like

@JP-Dub

Thanks for your reply. :slight_smile:
Actually, The example project provided by FCC uses the same method you described.
But still why the method I used is considered wrong?.
However, this method is the same method used in the FCC Add a Tooltip to a D3 Element challenge.