X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Flinear-regression.html;h=8f971f4a656792d93ec2428f4512d86d6c8eed04;hb=204161754f01aaf091f9fc7d5598ec5127a00f4f;hp=03c95c23b4b870da173a1efb48b2490924a733cf;hpb=848b47c9adc94820b3e8110b2b1624bb0adbcc7d;p=dygraphs.git diff --git a/tests/linear-regression.html b/tests/linear-regression.html index 03c95c2..8f971f4 100644 --- a/tests/linear-regression.html +++ b/tests/linear-regression.html @@ -1,13 +1,17 @@ + + Linear Regression - - - - + + + @@ -55,6 +59,10 @@ var y = g.getValue(i, series); if (y == null) continue; + if (y.length == 2) { + // using fractions + y = y[0] / y[1]; + } num++; sum_x += x;