1 /*global Gallery,Dygraph,data */
5 name
: 'Negative values',
6 setup
: function(parent
) {
8 "<p>All negatives (x-axis on top):</p>" +
9 "<div id='g1' style='width:600px; height:200px;'></div>" +
11 "<p>Mixed (x-axis in middle):</p>" +
12 "<div id='g2' style='width:600px; height:200px;'></div>" +
14 "<p>All positives (x-axis on bottom):</p>" +
15 "<div id='g3' style='width:600px; height:200px;'></div>";
21 for (var i
= 0; i
< 100; i
++) {
22 negs
.push([i
, -210 + i
, -110 - i
]);
23 mixed
.push([i
, -50 + i
, 50 - i
]);
24 pos
.push([i
, 1000 + 2 * i
, 1100 + i
]);
28 document
.getElementById("g1"),
29 negs
, { labels
: [ 'x', 'y1', 'y2' ] }
33 document
.getElementById("g2"),
34 mixed
, { labels
: [ 'x', 'y1', 'y2' ] }
38 document
.getElementById("g3"),
39 pos
, { labels
: [ 'x', 'y1', 'y2' ] }