X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Flinear-regression.js;h=11caff2f6a51cf032dc4846aacb18329ee56d87c;hb=f93af875f34cdc7ed523f2545103ef6d6f4a1891;hp=de020752ce4f50821e433200a10d7a0114097ed0;hpb=5be52ac33ffa79ee2212158aaed71ec3ffb6736c;p=dygraphs.git diff --git a/gallery/linear-regression.js b/gallery/linear-regression.js index de02075..11caff2 100644 --- a/gallery/linear-regression.js +++ b/gallery/linear-regression.js @@ -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 } );