X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=dygraph.js;h=3612c1195bac49e7a0243e576274f5547f1f23cd;hb=8114048a36bdb90f7a3ffbf583a3efff13e96a39;hp=c71d44f22508cbdcb4b0b1d26a37f4f11a98e236;hpb=02c93ff56e47163fa45a7b4d671aa9958702fc6f;p=dygraphs.git diff --git a/dygraph.js b/dygraph.js index c71d44f..3612c11 100644 --- a/dygraph.js +++ b/dygraph.js @@ -418,6 +418,9 @@ Dygraph.prototype.__init__ = function(div, file, attrs) { attrs.animatedZooms = false; } + // DEPRECATION WARNING: All option processing should be moved from + // attrs_ and user_attrs_ to options_, which holds all this information. + // // Dygraphs has many options, some of which interact with one another. // To keep track of everything, we maintain two sets of options: // @@ -2453,7 +2456,6 @@ Dygraph.prototype.computeYAxes_ = function() { } } - // New axes options for (axis = 0; axis < this.axes_.length; axis++) { if (axis === 0) { opts = this.optionsViewForAxis_('y' + (axis ? '2' : '')); @@ -3195,6 +3197,7 @@ Dygraph.prototype.parseDataTable_ = function(data) { if (annotations.length > 0) { this.setAnnotations(annotations, true); } + this.attributes_.reparseSeries(); }; /** @@ -3329,6 +3332,10 @@ Dygraph.mapLegacyOptions_ = function(attrs) { }; var map = function(opt, axis, new_opt) { if (typeof(attrs[opt]) != 'undefined') { + Dygraph.warn("Option " + opt + " is deprecated. Use the " + + new_opt + " option for the " + axis + " axis instead. " + + "(e.g. { axes : { " + axis + " : { " + new_opt + " : ... } } } " + + "(see http://dygraphs.com/per-axis.html for more information."); set(axis, new_opt, attrs[opt]); delete my_attrs[opt]; }