score:2

Accepted answer

Besides changing the scale...

var x = d3.scaleTime()

... and the domain...

x.domain(d3.extent(data, function (d) { return d.year; }));

... the important part here is using interval.every to set the interval between the ticks.

For instance, one tick every 10 years:

d3.axisBottom(x).ticks(d3.timeYear.every(10))

Here is the updated Plunker: https://plnkr.co/edit/aSHJ6cIZyb0h1st1mX5w?p=preview


PS: you should not use bars (bar chart) with time as a variable. That's not the purpose of a bar chart. For instance, you'll have the problem of the bar width (which in the Plunker I set to 10 pixels). Have a look at my explanation here: https://stackoverflow.com/a/48279536/5768908


Related Query