flot/flot — pull request #76 by dbishop (2012-09-16 21:15:54+00:00)
Title: Fix non-time tick generation for changed data.

There was a bug where non-time axes (i.e. the default "base 10
behavior") would assign a function to axis.tickGenerator which used
axis.tickSize to generate ticks. But nothing would recalculate
axis.tickSize or assign a new function to axis.tickGenerator when new
data was loaded and the plot redrawn. This would cause *way* to many
ticks to be drawn when a plot was reused to render data with a greater
delta (axis.max - axis.min).

This bug arose because there are two ways of handling axis tick
generation. The default "base 10" fall-back, and the time plugin.

The time plugin's ticks are not vulnerable to the above bug because it
reassigns to axis.tickGenerator upon every data load, and most of its
calculations are done inside the tickGenerator function.

This patch fixes the above bug by implementing the default "base 10"
behavior as an inline plugin (to maintain backard compatibility)
analogous to the time plugin. This new plugin is used when the
axis.mode is "base10" or left undefined.

Now axis tick generation is consistently handled by plugins, and if no
specific mode is specified, the "base10" plugin is used.