In Flot.js, bar graphs and line graphs have numbers as the coordinates in the x and y axis by default.
How can you make the coordinates such that the numbers are only integers or at least only the integers are visible?
In Flot.js, bar graphs and line graphs have numbers as the coordinates in the x and y axis by default.
How can you make the coordinates such that the numbers are only integers or at least only the integers are visible?
Looks like more recent versions of Flotr use a different option to control this since the original answer:
Just supply an integer with the number of decimals to show.
NB: This is for Flotr2.
Check out the
minTickSize
option from the documentation:So in your graph options, you would specify it like this:
See it working here: http://jsfiddle.net/ryleyb/g2CTz/