fix partial arc bug in IE (degrees -> radians)
authorDan Vanderkam <danvk@google.com>
Thu, 3 Dec 2009 18:20:29 +0000 (10:20 -0800)
committerDan Vanderkam <danvk@google.com>
Thu, 3 Dec 2009 18:20:29 +0000 (10:20 -0800)
dygraph-canvas.js
dygraph.js

index 58e6917..11affc2 100644 (file)
@@ -537,7 +537,8 @@ DygraphCanvasRenderer.prototype._renderLineChart = function() {
           if (drawPoints || isIsolated) {
            ctx.beginPath();
            ctx.fillStyle = color;
-           ctx.arc(point.canvasx, point.canvasy, pointSize, 0, 360, false);
+           ctx.arc(point.canvasx, point.canvasy, pointSize,
+                   0, 2 * Math.PI, false);
            ctx.fill();
           }
         }
index c5ee9d1..402bcc7 100644 (file)
@@ -755,7 +755,7 @@ Dygraph.prototype.mouseMove_ = function(event) {
       ctx.beginPath();
       ctx.fillStyle = this.colors_[i%clen];
       ctx.arc(canvasx, this.selPoints_[i%clen].canvasy, circleSize,
-              0, 360, false);
+              0, 2 * Math.PI, false);
       ctx.fill();
     }
     ctx.restore();