Tell us what’s happening:
Hey, so I used to struggle a lot with d3js and back then just discarded that one certification and moved on. Now I’m back trying and I’ve finished (almost?) the Heat Map challenge, however it says it does not align on the y-axis.
I can get that test to complete by letting the data-year attribute be directly taken from the data input (range: 1-12), but that means it fails the test that all data must be in the range 0-11. Thus why I say
d => d.month - 1 whenever I set the attribute for a cell. But for some reason that means the other test starts failing (saying that my cells do not align). I’ve tried to see if it was something about pixels - i.e. moving the cells 1-5 pixels up or down but neither have helped.
I’ve tried using my xScale and yScale to calculate the x- and y-attributes but that just makes all my data disappear
Let me know if I need to clarify something further.
I hope someone will be able to help me!
Thank you in advance,
Your code so far
Your browser information:
User Agent is:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36
Challenge: Visualize Data with a Heat Map
Link to the challenge: