Hello everybody,
I’m working on the project about D3 Heat Map. My output is almost done, but I can’t still pass one of the test. In particular I get:
My heat map should have cells that align with the corresponding month on the y-axis. AssertionError: month values don’t line up with y locations : expected false to be true
Here’s my code for the y scale and y position of the bar:
const yScale = d3.scaleBand()
.domain([1,2,3,4,5,6,7,8,9,10,11,12])
.range([padding, h - padding]);
svg.selectAll("rect")
.data(dataset)
.enter()
.append("rect")
.attr("class", "cell")
.attr("x", (d) => xScale(d.year)+1)
.attr("y", (d) => yScale(d.month))
.....
Anyone can help me? I can’t understand what the automatic test is checking