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