Skip to content
Advertisement

I want to remove the commas from the X axis with d3, but tickFormat does not work and instead, throws an error

I am making a bar chart with the years on the X axis. Currently trying to remove the commas using, tickFormat() but it throws an error.

JavaScript

Does anyone know what is wrong? My code:

JavaScript

Advertisement

Answer

Turns out I had to nest it inside the call for the axis.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement