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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -