Commit | Line | Data |
---|---|---|
00c281d4 NN |
1 | <html> |
2 | <head> | |
3 | <title>dygraph</title> | |
4 | <!--[if IE]> | |
5 | <script type="text/javascript" src="excanvas.js"></script> | |
6 | <![endif]--> | |
7 | <script type="text/javascript" src="../strftime/strftime-min.js"></script> | |
8 | <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script> | |
9 | <script type="text/javascript" src="../dygraph-canvas.js"></script> | |
10 | <script type="text/javascript" src="../dygraph.js"></script> | |
11 | </head> | |
12 | <body> | |
13 | <p>1: Line chart with axis at zero problem:</p> | |
14 | <div id="graph1"></div> | |
15 | <script type="text/javascript"> | |
16 | new Dygraph(document.getElementById("graph1"), | |
17 | "Date,Temperature\n" + | |
18 | "2008-05-07,0\n" + | |
19 | "2008-05-08,1\n" + | |
20 | "2008-05-09,0\n" + | |
21 | "2008-05-10,0\n" + | |
22 | "2008-05-11,3\n" + | |
23 | "2008-05-12,4\n" | |
24 | ) | |
25 | </script> | |
26 | ||
27 | <p>2: Step chart with axis at zero problem:</p> | |
28 | <div id="graphd2"></div> | |
29 | <script type="text/javascript"> | |
30 | new Dygraph(document.getElementById("graphd2"), | |
31 | "Date,Temperature\n" + | |
32 | "2008-05-07,0\n" + | |
33 | "2008-05-08,1\n" + | |
34 | "2008-05-09,0\n" + | |
35 | "2008-05-10,0\n" + | |
36 | "2008-05-11,3\n" + | |
37 | "2008-05-12,4\n", | |
38 | { | |
39 | stepPlot: true | |
40 | } | |
41 | ) | |
42 | </script> | |
43 | ||
44 | <p>3: Line chart with <code>avoidMinZero</code> option:</p> | |
45 | <div id="graph3"></div> | |
46 | <script type="text/javascript"> | |
47 | new Dygraph(document.getElementById("graph3"), | |
48 | "Date,Temperature\n" + | |
49 | "2008-05-07,0\n" + | |
50 | "2008-05-08,1\n" + | |
51 | "2008-05-09,0\n" + | |
52 | "2008-05-10,0\n" + | |
53 | "2008-05-11,3\n" + | |
54 | "2008-05-12,4\n", | |
55 | { | |
56 | avoidMinZero: true | |
57 | } | |
58 | ) | |
59 | </script> | |
60 | ||
61 | <p>4: Step chart with <code>avoidMinZero</code> option:</p> | |
62 | <div id="graphd4"></div> | |
63 | <script type="text/javascript"> | |
64 | new Dygraph(document.getElementById("graphd4"), | |
65 | "Date,Temperature\n" + | |
66 | "2008-05-07,0\n" + | |
67 | "2008-05-08,1\n" + | |
68 | "2008-05-09,0\n" + | |
69 | "2008-05-10,0\n" + | |
70 | "2008-05-11,3\n" + | |
71 | "2008-05-12,4\n", | |
72 | { | |
73 | stepPlot: true, | |
74 | avoidMinZero: true | |
75 | } | |
76 | ) | |
77 | </script> | |
78 | ||
79 | </body> | |
80 | </html> |