You can clone with
HTTPS or Subversion.
Original author: tagliala...@gmail.com (August 08, 2012 19:33:09)
Hi, just updated flot to last development version from github.
I just noticed that tickDecimals seems don't work anymore. I had to add in my project:
tickFormatter: (val, axis) ->
reading the diff log, I found
maybe there is an issue?
Hope it helps
Original issue: http://code.google.com/p/flot/issues/detail?id=732
From sanak...@gmail.com on August 10, 2012 21:17:43
I just wanted to add to this issue. The likely cause for what you're seeing is the pull request from a month ago in which the performance of the default tickFormatter was changed from using toFixed() to a factor method.
This change also had the side effect of no longer displaying decimal precision in ticks which did not originally have decimal places (aka integers), despite axis.tickDecimals having the correct number of decimals during calculation. I'm not sure that it was intended though...
I posted the following comment on that pull request (for reference):
I'm curious... this pull request has both a performance benefit, and a behavioural side effect (as referenced in pull request #57 - issue 541).
Before: [0.0, 2.5, 5.0, 7.5, 10.0]
After: [0, 2.5, 5, 7.5, 10]
It seems like there is argument both to mirror precision if precision is detected, or ignore precision if a tick is an integer regardless of whether or not other ticks might have precision.
This was unintentional; the formatter should always respect tickDecimals when it is specified. The default is (as introduced by #50) not to add precision to integers.