Help with D3 Bar Chart Axes

I cannot figure out what is wrong with the axes on my bar chart. The scales seem to be correct because the graph looks okay, but apparently not because inputting the scales into the axis functions produces what you see here: What is wrong with the scales? Can anyone point me in the right direction? Thanks!

EDIT: I tried the scaleTime function and manually input the dates but the bars are right on top of each other.

Ok, got this far but why is the y axis upside down?

Hello there,

The .domain is where your y-axis issue is:

let yScale = d3
    .domain([0, d3.max(gdp, (d) => d[1])]) //0: Array [ 243.1, 18064.7 ]
    .range([0,height - margin.bottom ])

Just think through what it is doing, and perhaps re-read this lesson:

Hope this helps

Ok, I will focus on that. Thanks.