4 <meta http-equiv=
"X-UA-Compatible" content=
"IE=EmulateIE7; IE=EmulateIE9">
7 <script type=
"text/javascript" src=
"../excanvas.js"></script>
10 For production (minified) code, use:
11 <script type=
"text/javascript" src=
"dygraph-combined.js"></script>
13 <script type=
"text/javascript" src=
"../dygraph-dev.js"></script>
18 <h1>Potential Y Axis formatting problems for small values
</h1>
20 <p>The problem using default y axis formatting for very small values:
</p>
21 <div id=
"graph1"></div>
22 <script type=
"text/javascript">
24 document.getElementById(
"graph1"),
39 <p>The solution using a Y axis formatting function:
</p>
40 <div id=
"graph2"></div>
41 <script type=
"text/javascript">
43 document.getElementById(
"graph2"),
53 yValueFormatter: function(x) {
54 var shift = Math.pow(
10,
5)
55 return Math.round(x * shift) / shift
62 <p>Different yValueFormatter and yAxisLabelFormatter functions:
</p>
63 <div id=
"graph3"></div>
64 <script type=
"text/javascript">
66 document.getElementById(
"graph3"),
76 yValueFormatter: function(x) {
77 var shift = Math.pow(
10,
5)
78 return
"*" + Math.round(x * shift) / shift
80 yAxisLabelFormatter: function(x) {
81 var shift = Math.pow(
10,
5)
82 return
"+" + Math.round(x * shift) / shift