projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new issue and PR templates
[dygraphs.git]
/
tests
/
plotter.html
diff --git
a/tests/plotter.html
b/tests/plotter.html
index
af9968d
..
38a76f8
100644
(file)
--- a/
tests/plotter.html
+++ b/
tests/plotter.html
@@
-1,12
+1,13
@@
+<!DOCTYPE html>
<html>
<head>
<title>dygraphs Equation Plotter</title>
<html>
<head>
<title>dygraphs Equation Plotter</title>
- <!--
[if IE]>
- <script type="text/javascript" src="excanvas.js"></script>
- <
![endif]--
>
-
<script type="text/javascript" src="../dygraph-combined.js"></script
>
- <script type="text/javascript" src="../d
ygraph-canvas
.js"></script>
- <script type="text/javascript" src="../dygraph.js"></script>
+ <!--
+ For production (minified) code, use:
+ <
script type="text/javascript" src="dygraph-combined.js"></script
>
+
--
>
+ <script type="text/javascript" src="../d
ist/dygraph
.js"></script>
+
<script type="text/javascript">
function plot() {
var eq = document.getElementById("eq").value;
<script type="text/javascript">
function plot() {
var eq = document.getElementById("eq").value;
@@
-33,7
+34,18
@@
data.push(row);
}
data.push(row);
}
- g = new Dygraph(graph, data);
+ var labels = ['X'];
+ if (data[0].length == 2) {
+ labels.push('Y');
+ } else {
+ for (var i = 1; i < data[0].length; i++) {
+ labels.push('Y' + (1 + i));
+ }
+ }
+
+ g = new Dygraph(graph, data, {
+ labels: labels
+ });
}
function preset() {
}
function preset() {