Commit | Line | Data |
---|---|---|
54425b14 | 1 | <!DOCTYPE html> |
00c281d4 NN |
2 | <html> |
3 | <head> | |
4 | <title>dygraph</title> | |
7e5ddc94 DV |
5 | <!-- |
6 | For production (minified) code, use: | |
7 | <script type="text/javascript" src="dygraph-combined.js"></script> | |
8 | --> | |
fbd6834a | 9 | <script type="text/javascript" src="../dist/dygraph.js"></script> |
7e5ddc94 | 10 | |
00c281d4 NN |
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"> | |
f6fbf9e0 | 16 | var g1 = new Dygraph(document.getElementById("graph1"), |
00c281d4 NN |
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"> | |
f6fbf9e0 | 30 | var g2 = new Dygraph(document.getElementById("graphd2"), |
00c281d4 NN |
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"> | |
f6fbf9e0 | 47 | var g3 = new Dygraph(document.getElementById("graph3"), |
00c281d4 NN |
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"> | |
f6fbf9e0 | 64 | var g4 = new Dygraph(document.getElementById("graphd4"), |
00c281d4 NN |
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> |