Not sure why my code is not passing test #10 for the D3 bar chart assignment

Tell us what’s happening:
Hello,

I’m not sure why my code is not passing the test #10 (" The data-date attribute and its corresponding bar element should align with the corresponding value on the x-axis"). Everything is actually aligned exactly same way as in the given example.

Here is my pen.

I used scaleTime() and new Date() in the domain to setup xAxis, so I’m thinking that maybe me converting values in the Date format could be interfering with the test cases, but I’m not quite sure if that’s an issue.

Your code so far

const xScale = d3.scaleTime()
  .domain([new Date(dataset[0][0]), new Date(dataset[dataset.length - 1][0])])
  .range([0, innerWidth]);

const yScale = d3.scaleLinear()
  .domain([0, d3.max(dataset, yValue)])
  .range([innerHeight, 0]);

const xAxis = d3.axisBottom(xScale).tickFormat(d3.timeFormat("%Y"));
const yAxis = d3.axisLeft(yScale);

Your browser information:

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

Challenge: Visualize Data with a Bar Chart

Link to the challenge: