Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
d053ab5a DV |
2 | <html> |
3 | <head> | |
4 | <title>no range</title> | |
7e5ddc94 DV |
5 | <!-- |
6 | For production (minified) code, use: | |
7 | <script type="text/javascript" src="dygraph-combined.js"></script> | |
8 | --> | |
9 | <script type="text/javascript" src="../dygraph-dev.js"></script> | |
10 | ||
d053ab5a DV |
11 | </head> |
12 | <body> | |
13 | <p>There should be an appropriate amount of padding at the top of the chart:</p> | |
14 | <div id="blah"></div> | |
15 | ||
16 | <script type="text/javascript"> | |
17 | function CSV() { | |
18 | var label = "X"; | |
19 | ||
20 | return "date," + label + "\n20091206,2659329.631743\n20091213,2772361.123362\n20091220,2737584.647191\n20091227,2720000.550414\n20100103,2910306.897977\n20100110,2901385.313093\n20100117,2903041.312099\n20100124,2966455.128911\n"; | |
21 | } | |
22 | ||
f6fbf9e0 | 23 | var g1 = new Dygraph(document.getElementById("blah"), |
d053ab5a DV |
24 | CSV, |
25 | { | |
26 | width: 640, | |
27 | height: 480, | |
28 | includeZero: true | |
29 | }); | |
30 | ||
31 | </script> | |
85abed30 DV |
32 | |
33 | <p>The second series (which is entirely zero) should be visible, and the | |
34 | y-axis should go down to zero.</p> | |
35 | <div id="blah2"></div> | |
36 | <script type="text/javascript"> | |
37 | var data=[ | |
38 | ["2006-10-11",0,15228], | |
39 | ["2006-10-12",0,15219], | |
40 | ["2006-10-13",0,15225], | |
41 | ["2006-10-14",0,15212], | |
42 | ["2006-10-15",0,15211], | |
43 | ["2006-10-16",0,15322], | |
44 | ["2006-10-17",0,15414], | |
45 | ["2006-10-18",0,15422], | |
46 | ["2006-10-19",0,15434], | |
47 | ["2006-10-20",0,15423] | |
48 | ]; | |
49 | var str = ""; | |
50 | for (var i = 0; i < data.length; i++) { | |
51 | str += data[i].join(",") + "\n"; | |
52 | } | |
53 | ||
f6fbf9e0 | 54 | var g2 = new Dygraph(document.getElementById("blah2"), |
85abed30 DV |
55 | str, |
56 | { labels: [ "date", "zero", "non-zero" ] }); | |
57 | </script> | |
d053ab5a DV |
58 | </body> |
59 | </html> |