Please help me with tooltips for the Bar Chart project

Tell us what’s happening:

Hello,

I don’t really understand why my bar chart visualization cannot pass the tooltip tests as well as why I can’t modify the tooltips with CSS. However, I am able to see the information that is supposed to be showing for each bar in the graph.

I tried different variations of the following code, but nothing had worked as it should be to pass the tests.

Your code so far

 svg.selectAll("rect")
       .append("title")
       .text((d) => `${d[2]} \n$${d[1]} Billion`)
       .attr("id","tooltip")

// OR

svg.selectAll("title")
   .data(dataset)
   .enter()
   .append("title")
   //.attr("class","tooltips")
   .attr("id", "tooltip")
   .text((d) => `${d[2]} \n$${d[1]} Billion`)
   .attr("data-date", (d, i) => d[0])

Here is the link on my pen: Codepen Bar Chart Project

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36.

Challenge: Visualize Data with a Bar Chart

Link to the challenge: