7

I am using jqplot, and it gets marks by default like this:

jqplot screenshot

What should I do to get it without .0 at the end?

pimvdb
  • 151,816
  • 78
  • 307
  • 352
EK.
  • 2,890
  • 9
  • 36
  • 49
  • 1
    Perhaps you want to set `stringFormat`: http://www.jqplot.com/docs/files/plugins/jqplot-highlighter-js.html#$.jqplot.Highlighter.formatString. `%d` would represent a signed integer. – pimvdb Oct 17 '11 at 10:04
  • 3
    Thanks!If someone wants to do it, this is piece of code axes:{ xaxis:{min:0, max:31, tickOptions: { formatString:'%d' }, }, – EK. Oct 17 '11 at 11:54

1 Answers1

11

Since it was indeed the answer I'll post it as an actual one.

With stringFormat, you can format the string of the axis labels, and it uses sprintf notation, where %d is a signed integer. Since integers do not have decimals, it is probably what you want.

pimvdb
  • 151,816
  • 78
  • 307
  • 352
  • 1
    This sort of works. Since it doesn't hide non-whole numbers, only changes their values, a problem arises on axes with a small range. Instead of `0, 0.5, 1.0, 1.5, 2.0...` you will see `0, 1, 1, 2, 2...` – Keith Mar 03 '16 at 17:26