4 <meta http-equiv=
"X-UA-Compatible" content=
"IE=EmulateIE7; IE=EmulateIE9">
7 <script type=
"text/javascript" src=
"../excanvas.js"></script>
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>
16 <h1>Potential Y Axis formatting problems for small values
</h1>
18 <p>The problem using default y axis formatting for very small values:
</p>
19 <div id=
"graph1"></div>
20 <script type=
"text/javascript">
22 document.getElementById(
"graph1"),
37 <p>The solution using a Y axis formatting function:
</p>
38 <div id=
"graph2"></div>
39 <script type=
"text/javascript">
41 document.getElementById(
"graph2"),
51 yValueFormatter: function(x) {
52 var shift = Math.pow(
10,
5)
53 return Math.round(x * shift) / shift
60 <p>Different yValueFormatter and yAxisLabelFormatter functions:
</p>
61 <div id=
"graph3"></div>
62 <script type=
"text/javascript">
64 document.getElementById(
"graph3"),
74 yValueFormatter: function(x) {
75 var shift = Math.pow(
10,
5)
76 return
"*" + Math.round(x * shift) / shift
78 yAxisLabelFormatter: function(x) {
79 var shift = Math.pow(
10,
5)
80 return
"+" + Math.round(x * shift) / shift