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