javascript - How to format the units to avoid decimal points? -
one of graph, display number of persons in each category, axis ordinal. if put 10
ticks , elasticx
, starts max number of several hundreds, , each tick number.
however, if click on other charts , filter until max category has 5 persons, tick 0,5 | 1 | 1,5 | 2...
it looks silly display option of 1.5 person. there way adjust number of ticks doesn't display step < 1
?
pure d3 solution, tip:
.tickformat(d3.format("d"))
Comments
Post a Comment