6 <script type=
"text/javascript" src=
"../excanvas.js"></script>
8 <script type=
"text/javascript" src=
"../strftime/strftime-min.js"></script>
9 <script type=
"text/javascript" src=
"../rgbcolor/rgbcolor.js"></script>
10 <script type=
"text/javascript" src=
"../dygraph-canvas.js"></script>
11 <script type=
"text/javascript" src=
"../dygraph.js"></script>
15 <h1>Potential Y Axis formatting problems for small values
</h1>
17 <p>The problem using default y axis formatting for very small values:
</p>
18 <div id=
"graph1"></div>
19 <script type=
"text/javascript">
21 document.getElementById(
"graph1"),
36 <p>The solution using a Y axis formatting function:
</p>
37 <div id=
"graph2"></div>
38 <script type=
"text/javascript">
40 document.getElementById(
"graph2"),
50 yValueFormatter: function(x) {
51 var shift = Math.pow(
10,
5)
52 return Math.round(x * shift) / shift
59 <p>Different yValueFormatter and yAxisLabelFormatter functions:
</p>
60 <div id=
"graph3"></div>
61 <script type=
"text/javascript">
63 document.getElementById(
"graph3"),
73 yValueFormatter: function(x) {
74 var shift = Math.pow(
10,
5)
75 return
"*" + Math.round(x * shift) / shift
77 yAxisLabelFormatter: function(x) {
78 var shift = Math.pow(
10,
5)
79 return
"+" + Math.round(x * shift) / shift