Merge branch 'master' of github.com:danvk/dygraphs into closure
[dygraphs.git] / gallery / linear-regression.js
index de02075..11caff2 100644 (file)
@@ -1,4 +1,3 @@
-// Use this as a template for new Gallery entries.
 Gallery.register(
   'linear-regression',
   {
@@ -89,7 +88,7 @@ Gallery.register(
           var p1 = g.toDomCoords(x1, y1);
           var p2 = g.toDomCoords(x2, y2);
 
-          var c = new RGBColor(g.getColors()[i - 1]);
+          var c = new RGBColorParser(g.getColors()[i - 1]);
           c.r = Math.floor(255 - 0.5 * (255 - c.r));
           c.g = Math.floor(255 - 0.5 * (255 - c.g));
           c.b = Math.floor(255 - 0.5 * (255 - c.b));
@@ -113,6 +112,7 @@ Gallery.register(
                 labels: ['X', 'Y1', 'Y2'],
                 underlayCallback: drawLines,
                 drawPoints: true,
+                drawAxesAtZero: true,
                 strokeWidth: 0.0
               }
           );