X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Flinear-regression-addseries.html;h=9a20fe8456fdd39b6a7b21092a7fe7be455d5b85;hb=54425b14df388e9337a1d77876512bb60ba74c3b;hp=2a746b5e2d5e600bd38b985f5ff2ceeae389fa7a;hpb=f30cf7405c2071be3b802bc569e2cab5a7675afa;p=dygraphs.git diff --git a/tests/linear-regression-addseries.html b/tests/linear-regression-addseries.html index 2a746b5..9a20fe8 100644 --- a/tests/linear-regression-addseries.html +++ b/tests/linear-regression-addseries.html @@ -1,3 +1,4 @@ + Linear Regression @@ -61,6 +62,10 @@ var y = data[i][series]; if (y == null) continue; + if (y.length == 2) { + // using fractions + y = y[0] / y[1]; + } num++; sum_x += x;