How can I assign a specific attribute to my tooltip?

Hi all!

I am unable to pass the last test:
User Story #13: My tooltip should have a data-date property that corresponds to the data-date of the active area.

I thought this line of code on line 20 would do, but it does not work:

.attr("data-date", (d,i) => timeArray[i]);

How can I pass this test?

Thanks for your time

Jaime

Bonus question: what is the point of giving the tooltip this attribute?

Your browser information:

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

Challenge: Visualize Data with a Bar Chart

Link to the challenge:

Hey,

Add data-date attribute in hover handler

1 Like

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