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