projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2281c33
)
works
author
Dan Vanderkam
<danvdk@gmail.com>
Thu, 21 Oct 2010 12:41:30 +0000
(08:41 -0400)
committer
Dan Vanderkam
<danvdk@gmail.com>
Thu, 21 Oct 2010 12:41:30 +0000
(08:41 -0400)
tests/linear-regression.html
patch
|
blob
|
blame
|
history
diff --git
a/tests/linear-regression.html
b/tests/linear-regression.html
index
93d95d9
..
6ccc94e
100644
(file)
--- a/
tests/linear-regression.html
+++ b/
tests/linear-regression.html
@@
-57,6
+57,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;
@@
-95,6
+99,10
@@
var x2 = range[1];
var y2 = a * x2 + b;
+ // Scale up to percentages, rather than fractions.
+ y1 *= 100;
+ y2 *= 100;
+
var p1 = g.toDomCoords(x1, y1);
var p2 = g.toDomCoords(x2, y2);