X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Fplotter.html;h=c2f0b812d2f782cc9614514cc7b970d5170322bf;hb=3c3b0a9da6dce1301dcccc6968e30b4792d4d3bd;hp=58054b8b7d549e9ec533e4fde02e595382ef4554;hpb=7e5ddc9488079169a4311f870727043b5216a81e;p=dygraphs.git diff --git a/tests/plotter.html b/tests/plotter.html index 58054b8..c2f0b81 100644 --- a/tests/plotter.html +++ b/tests/plotter.html @@ -38,7 +38,18 @@ 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() {