* MIT-licensed (http://opensource.org/licenses/MIT)
*/
+/*global Dygraph:false */
+
Dygraph.Plugins.Annotations = (function() {
+"use strict";
+
/**
Current bits of jankiness:
- Uses dygraph.layout_ to get the parsed annotations.
annotations.prototype.activate = function(g) {
return {
clearChart: this.clearChart,
- drawChart: this.drawChart
+ didDrawChart: this.didDrawChart
};
};
this.detachLabels();
};
-annotations.prototype.drawChart = function(e) {
+annotations.prototype.didDrawChart = function(e) {
var g = e.dygraph;
// Early out in the (common) case of zero annotations.
var points = g.layout_.annotated_points;
- if (!points || points.length == 0) return;
+ if (!points || points.length === 0) return;
var containerDiv = e.canvas.parentNode;
var annotationStyle = {