Data Visualization Projects - Visualize Data with a Bar Chart

Tell us what’s happening:
The tooltip tests do not pass when the tooltip is added using the d3 element - append(title) - can tooltip not be added this way?

Your code so far
please see code pen link below

Your browser information:

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

Challenge: Data Visualization Projects - Visualize Data with a Bar Chart

Link to the challenge:

No, but yours appear to be correct if they did work. You can search the forums for more details, but you should try a div.

You can read about title elements in the standard here. Since they are handled at the discretion of the user-agent and there seems to be a non-configurable transition time, they are not able to be made to work for these tests. They are also required to have display: none set in the user-agent stylesheet with highest priority and I see nothing indicating that that is changed if the user-agent renders the tooltip. So the tests can’t seem them if you use a title element.

Thanks for the response. But, if this not a standard, as previous posts have mentioned, the course should certainly add that information. I see lot of people write the code with the append(title) feature.

The title tag is a way to add extra information like in a tooltip. The W3 standard I linked to is quite explicit in that browsers may render it and probably should render it as a tool tip if they do. Which means it’s not required to be rendered, and hence not suitable to purpose for these tests. So you have to find another way; no course can cover everything.

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