From: Dan Vanderkam Date: Thu, 21 Oct 2010 12:42:46 +0000 (-0400) Subject: fractions regression X-Git-Tag: v1.0.0~624 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;ds=sidebyside;h=d1dfab803da706bb80a867d433bc839bb4ca33fc;p=dygraphs.git fractions regression --- diff --git a/tests/linear-regression-addseries.html b/tests/linear-regression-addseries.html index 2a746b5..3fd3a85 100644 --- a/tests/linear-regression-addseries.html +++ b/tests/linear-regression-addseries.html @@ -61,6 +61,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; diff --git a/tests/linear-regression-fractions.html b/tests/linear-regression-fractions.html new file mode 100644 index 0000000..6ccc94e --- /dev/null +++ b/tests/linear-regression-fractions.html @@ -0,0 +1,136 @@ + + + Linear Regression + + + + + + + + +

Linear Regression Demo

+

Click the buttons to generate linear regressions over either data + series. If you zoom in and click the regression button, the regression will + only be run over visible points. Zoom back out to see what the local + regression looks like over the full data.

+ +
+ + + +
+ +

+ +

+ +
+ +