Use CSS for tests, gallery and docs
[dygraphs.git] / tests / avoidMinZero.html
... / ...
CommitLineData
1<!DOCTYPE html>
2<html>
3 <head>
4 <link rel="stylesheet" href="../css/dygraph.css">
5 <title>dygraph</title>
6 <!--
7 For production (minified) code, use:
8 <script type="text/javascript" src="dygraph-combined.js"></script>
9 -->
10 <script type="text/javascript" src="../dist/dygraph.js"></script>
11
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 var g1 = 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 var g2 = 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 var g3 = 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 var g4 = 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>