Stuck on "Heat Map"

Hi,
I almost finish the “Heat Map” challenge but 14 out of 18 of the tests pass, but I don’t find why. My project is on this link: “Heat Map” FCC Project (codepen.io).
Thanks in advance.

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

Challenge: Visualize Data with a Heat Map

Link to the challenge:

There are two issues. All the data-year type tests are checking things of class cell. In your legend

  .attr("class", "cell")

you called those legend boxes cell as well and the tests are finding them and they do not have the attributes.

The last test failure is the y-axis alignment test. I didn’t chase the exact cause of failure but I did notice your months are strange in your tooltips. The January row has 12 as it’s month and the rest run from 1-11 as JS month indices do. Finding a 12 for a January cell would fail a month test. I would check the month values first as they seem suspicious. You may also want to investigate the D3 time functions like d3.timeParse() and the d3.scaleTime() for building your scales and axes even though band scales can also work.

Thanks so much, for the y-axis alignment test, I needed to subtract a 1 to the month when parsing to date.

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