D3 remove comma delimiters for thousands

前端 未结 1 1939
傲寒
傲寒 2021-02-18 13:31

I have a .json with 3 columns where one of them is \'Year\'. The column contains only years. No dates!.

When I am graphing it on the \'x\' axis the years come out with a

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-18 13:55

    You should add .tickFormat(d3.format("d")) to your xAxis:

    var xAxis = d3.svg.axis().scale(x).orient("bottom").tickFormat(d3.format("d"));
    

    0 讨论(0)
提交回复
热议问题