My graph has a tooltip but it is not passing the test

const drawBars = () => {

svg.selectAll(“rect”)
.data(data)
.enter()
.append(“rect”)
.attr(“class”, “bar”)
.attr(“width”, (w - 2 * p) / data.length)
.attr(“data-date”, (d) => d[0])
.attr(“data-gdp”, (d) => d[1])
.attr(“height”, (d) => {
return yScale(d[1]);
})
.attr(“x”, (d, i) => xScale(i))
.attr(“y”, (d) => {
return h - p - yScale(d[1]);
})
.append(‘title’)
.attr(‘data-date’, d=>d[0])
.text(d=>d[0])

}

This is my code that generates the bars. The tooltip is being displayed correctly on screen but it is not passing the tests.

It looks like you are using codepen. Can you post the link to the pen? It would make it much easier to help you.

Yeah here it is, thank you !

You can’t make the tooltips with title and pass the tests. Search the forums for more details.

But that is what I learned from the courses lol

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