Set this for drawCallback
authorDan Vanderkam <danvdk@gmail.com>
Mon, 13 Apr 2015 17:47:33 +0000 (13:47 -0400)
committerDan Vanderkam <danvdk@gmail.com>
Tue, 26 May 2015 20:53:11 +0000 (16:53 -0400)
dygraph.js

index ea04d3e..eab46a2 100644 (file)
@@ -2726,7 +2726,7 @@ Dygraph.prototype.renderGraph_ = function(is_initial_draw) {
   this.canvas_.getContext('2d').clearRect(0, 0, this.width_, this.height_);
 
   if (this.getFunctionOption("drawCallback") !== null) {
-    this.getFunctionOption("drawCallback")(this, is_initial_draw);
+    this.getFunctionOption("drawCallback").call(this, this, is_initial_draw);
   }
   if (is_initial_draw) {
     this.readyFired_ = true;