Why does d3 show my x Axis year dates as .994 instead of 1994? What's with the decimal?

When I look at the value of the code it shows 1994, 2004, etc.

But it gets shown on the x-axis I generate as .994 and .04

Why? How can I fix it?29%20PM

bump, really curious why this happens

The ticks need to be formatted.

let xAxis = d3.axisBottom(x).tickFormat(d3.format("d"));


1 Like