-var smoothPlotter = (function() {
+(function() {
"use strict";
+var Dygraph;
+if (window.Dygraph) {
+ Dygraph = window.Dygraph;
+} else if (typeof(module) !== 'undefined') {
+ Dygraph = require('../dygraph');
+}
+
/**
* Given three sequential points, p0, p1 and p2, find the left and right
* control points for p1.
smoothPlotter.smoothing = 1/3;
smoothPlotter._getControlPoints = getControlPoints; // for testing
-return smoothPlotter;
+// older versions exported a global.
+// This will be removed in the future.
+// The preferred way to access smoothPlotter is via Dygraph.smoothPlotter.
+window.smoothPlotter = smoothPlotter;
+Dygraph.smoothPlotter = smoothPlotter;
})();