Commit ec7322e4 authored by David Schnur's avatar David Schnur

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.
parent bf3fffd1
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment