X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=sidebyside;f=tests%2Flinear-regression.html;h=eb27f904cef646df763a2090ec623da5010636e8;hb=176c94a4b3323501cd4a178bdf324c76b68b86ba;hp=03c95c23b4b870da173a1efb48b2490924a733cf;hpb=848b47c9adc94820b3e8110b2b1624bb0adbcc7d;p=dygraphs.git diff --git a/tests/linear-regression.html b/tests/linear-regression.html index 03c95c2..eb27f90 100644 --- a/tests/linear-regression.html +++ b/tests/linear-regression.html @@ -2,7 +2,7 @@ Linear Regression @@ -55,6 +55,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;