From: Mitch Foley Date: Fri, 15 Feb 2013 20:08:43 +0000 (-0500) Subject: Making dygraph-tickers.js slightly more independent. X-Git-Tag: v1.0.0~78^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=4ec7b44ab0077ff680be00577aa5b0c4317f2021;p=dygraphs.git Making dygraph-tickers.js slightly more independent. --- diff --git a/dygraph-tickers.js b/dygraph-tickers.js index 6ad3102..77f2f62 100644 --- a/dygraph-tickers.js +++ b/dygraph-tickers.js @@ -479,7 +479,13 @@ Dygraph.getDateAxis = function(start_time, end_time, granularity, opts, dg) { return ticks; }; -// These are set here so that this file can be included after dygraph.js. +// These are set here so that this file can be included after dygraph.js +// or independently. +Dygraph.DEFAULT_ATTRS = Dygraph.DEFAULT_ATTRS || {}; +Dygraph.DEFAULT_ATTRS['axes'] = Dygraph.DEFAULT_ATTRS['axes'] || {}; +Dygraph.DEFAULT_ATTRS['axes']['x'] = Dygraph.DEFAULT_ATTRS['axes']['x'] || {}; +Dygraph.DEFAULT_ATTRS['axes']['y'] = Dygraph.DEFAULT_ATTRS['axes']['y'] || {}; +Dygraph.DEFAULT_ATTRS['axes']['y2'] = Dygraph.DEFAULT_ATTRS['axes']['y2'] || {}; Dygraph.DEFAULT_ATTRS['axes']['x']['ticker'] = Dygraph.dateTicker; Dygraph.DEFAULT_ATTRS['axes']['y']['ticker'] = Dygraph.numericTicks; Dygraph.DEFAULT_ATTRS['axes']['y2']['ticker'] = Dygraph.numericTicks;