Where is the tooltip? After hovering, I don't see anything

Tell us what’s happening:
Describe your issue in detail here.
This is the solution from the challenge. When I hover over a bar, it just lights up. There are no tooltips. Could someone explain why?

Thank you.

  **Your code so far**

.bar:hover {
  fill: brown;
  const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9];

  const w = 500;
  const h = 100;

  const svg = d3.select("body")
     .attr("width", w)
     .attr("height", h);

     .attr("x", (d, i) => i * 30)
     .attr("y", (d, i) => h - 3 * d)
     .attr("width", 25)
     .attr("height", (d, i) => d * 3)
     .attr("fill", "navy")
     .attr("class", "bar")
     .text((d) => d)
     .text((d) => d)
     .attr("x", (d, i) => i * 30)
     .attr("y", (d, i) => h - (d * 3 + 3))

  **Your browser information:**

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Challenge: Add a Tooltip to a D3 Element

Link to the challenge:

Hey guys I figured it out! You have to wait a little before it shows up.

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