Initialize time-mode support in processOptions.

Resolves #1016.  Initialization consists of adding the tickGenerator and
tickFormatter functions to each axis.  This should happen exactly once
per plot, but since the code was previously using the processDatapoints
hook, it was called once per series.  When no series were present, it
ran zero times, triggering an exception when we later checked for the
existence of the functions.

Binding to the processOptions hook ensures that the axes are always
modified once, regardless of how many series there are.  The axes are
already initialized by the point the hook runs, so this change shouldn't
cause any problems.
master
David Schnur 13 years ago
parent bf3fffd1e1
commit ec7322e4ab

@ -194,7 +194,7 @@ API.txt for details.
[1, "year"]]);
function init(plot) {
plot.hooks.processDatapoints.push(function (plot, series, datapoints) {
plot.hooks.processOptions.push(function (plot, options) {
$.each(plot.getAxes(), function(axisName, axis) {
var opts = axis.options;

Loading…
Cancel
Save