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