this.datasetIndex_ = [];
this.registeredEvents_ = [];
+ this.eventListeners_ = {};
// Create the containing DIV and other interactive elements
this.createInterface_();
// At this point, plugins can no longer register event handlers.
// Construct a map from event -> ordered list of [callback, plugin].
- this.eventListeners_ = {};
for (var i = 0; i < this.plugins_.length; i++) {
var plugin_dict = this.plugins_[i];
for (var eventName in plugin_dict.events) {
if (this.attr_('showRangeSelector')) {
// The range selector must be created here so that its canvases and contexts get created here.
// For some reason, if the canvases and contexts don't get created here, things don't work in IE.
- // The range selector also sets xAxisHeight in order to reserve space.
this.rangeSelector_ = new DygraphRangeSelector(this);
}
}
var dygraph = this;
-
+
this.mouseMoveHandler = function(e) {
dygraph.mouseMove_(e);
};
this.addEvent(this.mouseEventElement_, 'mousemove', this.mouseMoveHandler);
-
+
this.mouseOutHandler = function(e) {
dygraph.mouseOut_(e);
};
node.removeChild(node.firstChild);
}
};
-
+
for (var idx = 0; idx < this.registeredEvents_.length; idx++) {
var reg = this.registeredEvents_[idx];
Dygraph.removeEvent(reg.elem, reg.type, reg.fn);
* This is where undesirable points (i.e. negative values on log scales and
* missing values through which we wish to connect lines) are dropped.
* TODO(danvk): the "missing values" bit above doesn't seem right.
- *
+ *
* @private
*/
Dygraph.prototype.extractSeries_ = function(rawData, i, logScale) {