projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
push flashcanvas to web
[dygraphs.git]
/
tests
/
linear-regression.html
diff --git
a/tests/linear-regression.html
b/tests/linear-regression.html
index
6a469b8
..
bc629a0
100644
(file)
--- a/
tests/linear-regression.html
+++ b/
tests/linear-regression.html
@@
-1,3
+1,4
@@
+<!DOCTYPE html>
<html>
<head>
<title>Linear Regression</title>
<html>
<head>
<title>Linear Regression</title>
@@
-55,6
+56,10
@@
var y = g.getValue(i, series);
if (y == null) continue;
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;
num++;
sum_x += x;