5 <script type=
"text/javascript" src=
"../excanvas.js"></script>
7 <script type=
"text/javascript" src=
"../strftime/strftime-min.js"></script>
8 <script type=
"text/javascript" src=
"../rgbcolor/rgbcolor.js"></script>
9 <script type=
"text/javascript" src=
"../dygraph-canvas.js"></script>
10 <script type=
"text/javascript" src=
"../dygraph.js"></script>
14 <h1>Potential Y Axis formatting problems for small values
</h1>
16 <p>The problem using default y axis formatting for very small values:
</p>
17 <div id=
"graph1"></div>
18 <script type=
"text/javascript">
20 document.getElementById(
"graph1"),
35 <p>The solution using a Y axis formatting function:
</p>
36 <div id=
"graph2"></div>
37 <script type=
"text/javascript">
39 document.getElementById(
"graph2"),
49 yValueFormatter: function(x) {
50 var shift = Math.pow(
10,
5)
51 return Math.round(x * shift) / shift
58 <p>Different yValueFormatter and yAxisLabelFormatter functions:
</p>
59 <div id=
"graph3"></div>
60 <script type=
"text/javascript">
62 document.getElementById(
"graph3"),
72 yValueFormatter: function(x) {
73 var shift = Math.pow(
10,
5)
74 return
"*" + Math.round(x * shift) / shift
76 yAxisLabelFormatter: function(x) {
77 var shift = Math.pow(
10,
5)
78 return
"+" + Math.round(x * shift) / shift