X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Flinear-regression.html;h=bc629a0e7c72c6a4cacc63bf9bf35e768664ed7a;hb=606568fef36a321148399da4c58a05e2753ac2f9;hp=6a469b8d8290d4193f083aee07e80d5c3aeb4922;hpb=f30cf7405c2071be3b802bc569e2cab5a7675afa;p=dygraphs.git diff --git a/tests/linear-regression.html b/tests/linear-regression.html index 6a469b8..bc629a0 100644 --- a/tests/linear-regression.html +++ b/tests/linear-regression.html @@ -1,3 +1,4 @@ + Linear Regression @@ -55,6 +56,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;