Heat map D3 star bad month

Heat map D3 star bad month
0.0 0

#1


first the map function start at 10 month in first year instead of 1 month.
second how extend axis Y by half on each side?
if I use this with one added month in range

 var scaley = d3.scaleTime()

            .domain([parseDateM(13), parseDateM(1)])
tickFormat((d,i)=> i > 0? (d3.timeFormat("%B")((d))):null)
I could not pass the test.

#2

I figure out the yscale, but the problem with map still remainig

   //y;
        var dataMonts=[];
for(var x= 0; x<=12;x++)dataMonts.push(parseDateMD(x+"/"+15));
var temp;
        var extent = d3.extent(dataMonts);
temp = extent[0];
extent[0]=extent[1] ;
extent[1]=temp;

        var scaley = d3.scaleTime()

            .domain(extent)
            .range([height - padding, padding]);
        var axisy = d3.axisLeft(scaley).
        tickFormat(d3.timeFormat("%B")) 
       ;

I found he solution of map function instead selectAll(“rect”) writeselectAll(“g.rect”)

but I still have problem wit 9.
9. My heat map should have cells that align with the corresponding month on the y-axis.