{
- "browser": true,
+ "newcap": true,
+ "noarg": true,
"shadow": true,
+ "strict": true,
+ "forin": true,
+ "immed": true,
+ "latedef": true,
+ "nonbsp": true,
+ "undef": true,
+
+ "browser": true,
"devel": true,
"globals": {
+ "DEBUG": true
},
"maxerr": 100000
}
- auto_tests/lib/Asserts.js (Apache 2.0 License)
- auto-tests/lib/JsTestDriver-1.3.3cjar (Apache 2.0 License
-Linter uses:
- - JSHint (modified MIT license; prevents evil)
-
excanvas: http://code.google.com/p/explorercanvas/
yui compressor: http://developer.yahoo.com/yui/compressor/
jsdoc toolkit: http://code.google.com/p/jsdoc-toolkit/
Asserts.js: http://www.google.com/codesearch/p?#3tsINRJRCro/trunk/JsTestDriver/src/com/google/jstestdriver/javascript/Asserts.js
JSTestDriver: http://code.google.com/p/js-test-driver/
-JSHint: jshint.com
-
dygraphs is available under the MIT license, included in LICENSE.txt.
"gwt",
"jsTestDriver.conf",
"jsdoc-toolkit",
- "jshint",
"lint.sh",
"node_modules",
"package.json",
* MIT-licensed (http://opensource.org/licenses/MIT)
*/
+(function() {
+'use strict';
+
/**
* @fileoverview Adds support for dashed lines to the HTML5 canvas.
*
* as a smaller even length array.
*/
CanvasRenderingContext2D.prototype.installPattern = function(pattern) {
- "use strict";
-
if (typeof(this.isPatternInstalled) !== 'undefined') {
throw "Must un-install old line pattern before installing a new one.";
}
// This will be replaced by a non-error version when a pattern is installed.
throw "Must install a line pattern before uninstalling it.";
};
+
+})();
- auto_tests/lib/Asserts.js (Apache 2.0 License)
- auto-tests/lib/JsTestDriver-1.3.3cjar (Apache 2.0 License
-Linter uses:
- - JSHint (modified MIT license; prevents evil)
-
excanvas: http://code.google.com/p/explorercanvas/
yui compressor: http://developer.yahoo.com/yui/compressor/
jsdoc toolkit: http://code.google.com/p/jsdoc-toolkit/
jquery: http://code.jquery.com/jquery-1.4.2.js
Asserts.js: http://www.google.com/codesearch/p?#3tsINRJRCro/trunk/JsTestDriver/src/com/google/jstestdriver/javascript/Asserts.js
JSTestDriver: http://code.google.com/p/js-test-driver/
-
-JSHint: jshint.com
</pre>
<!--#include virtual="footer.html" -->
* @constructor
*/
-/*jshint globalstrict: true */
+var DygraphCanvasRenderer = (function() {
/*global Dygraph:false */
"use strict";
DygraphCanvasRenderer._fastCanvasProxy = function(context) {
var pendingActions = []; // array of [type, x, y] tuples
var lastRoundedX = null;
- var extremeYs = null; // [minY, maxY] for lastRoundedX
var LINE_TO = 1,
MOVE_TO = 2;
ctx.fill();
}
};
+
+return DygraphCanvasRenderer;
+
+})();
* - http://dygraphs.com/tests/annotation-gviz.html
*/
-/*jshint globalstrict: true */
+(function() {
/*global Dygraph:false */
"use strict";
return selection;
};
+
+})();
* dygraphs.
*/
-/*jshint globalstrict: true */
+var DygraphLayout = (function() {
+
/*global Dygraph:false */
"use strict";
this.setPointsLengths = [];
this.setPointsOffsets = [];
};
+
+return DygraphLayout;
+
+})();
* MIT-licensed (http://opensource.org/licenses/MIT)
*/
-/*jshint globalstrict: true */
-/*global Dygraph:false */
-
// NOTE: in addition to parsing as JS, this snippet is expected to be valid
// JSON. This assumption cannot be checked in JS, but it will be checked when
// documentation is generated by the generate-documentation.py script. For the
*/
var DygraphOptions = (function() {
+/*jshint strict:false */
// For "production" code, this gets set to false by uglifyjs.
// Need to define it outside of "use strict", hence the nested IIFEs.
return (function() {
+// TODO: remove this jshint directive & fix the warnings.
/*jshint sub:true */
/*global Dygraph:false */
"use strict";
* middle of the years.
*/
-/*jshint globalstrict:true, sub:true */
+/*jshint sub:true */
/*global Dygraph:false */
+(function() {
"use strict";
/** @typedef {Array.<{v:number, label:string, label_v:(string|undefined)}>} */
* NOTE: this assumes that Dygraph.LOG_SCALE = 10.
* @type {Array.<number>}
*/
-Dygraph.PREFERRED_LOG_TICK_VALUES = function() {
+Dygraph.PREFERRED_LOG_TICK_VALUES = (function() {
var vals = [];
for (var power = -39; power <= 39; power++) {
var range = Math.pow(10, power);
}
}
return vals;
-}();
+})();
/**
* Determine the correct granularity of ticks on a date axis.
Dygraph.DEFAULT_ATTRS['axes']['y']['ticker'] = Dygraph.numericTicks;
Dygraph.DEFAULT_ATTRS['axes']['y2']['ticker'] = Dygraph.numericTicks;
}
+
+})();
if (typeof(DEBUG) === 'undefined') DEBUG=true;
var Dygraph = (function() {
-/*jshint globalstrict: true */
/*global DygraphLayout:false, DygraphCanvasRenderer:false, DygraphOptions:false, G_vmlCanvasManager:false,ActiveXObject:false */
"use strict";
* and maxNumberWidth options.
* @param {number} x The number to be formatted
* @param {Dygraph} opts An options view
- * @param {string} name The name of the point's data series
- * @param {Dygraph} g The dygraph object
*/
-Dygraph.numberValueFormatter = function(x, opts, pt, g) {
+Dygraph.numberValueFormatter = function(x, opts) {
var sigFigs = opts('sigFigs');
if (sigFigs !== null) {
* variant for use as an axisLabelFormatter.
* @private
*/
-Dygraph.numberAxisLabelFormatter = function(x, granularity, opts, g) {
- return Dygraph.numberValueFormatter(x, opts, g);
+Dygraph.numberAxisLabelFormatter = function(x, granularity, opts) {
+ return Dygraph.numberValueFormatter(x, opts);
};
/**
var handlers = pluginInstance.activate(this);
for (var eventName in handlers) {
+ if (!handlers.hasOwnProperty(eventName)) continue;
// TODO(danvk): validate eventName.
pluginDict.events[eventName] = handlers[eventName];
}
Dygraph.mapLegacyOptions_ = function(attrs) {
var my_attrs = {};
for (var k in attrs) {
+ if (!attrs.hasOwnProperty(k)) continue;
if (k == 'file') continue;
if (attrs.hasOwnProperty(k)) my_attrs[k] = attrs[k];
}
Dygraph.Plugins.Legend = (function() {
/*
-
Current bits of jankiness:
- Uses two private APIs:
1. Dygraph.optionsViewForAxis_
2. dygraph.plotter_.area
- Registers for a "predraw" event, which should be renamed.
- I call calculateEmWidthInDiv more often than needed.
-
*/
-/*jshint globalstrict: true */
/*global Dygraph:false */
"use strict";
Dygraph.Plugins.RangeSelector = (function() {
-/*jshint globalstrict: true */
/*global Dygraph:false */
"use strict";