spelling fixes
[dygraphs.git] / tests / number-format.html
index e17a15c..f722ff2 100644 (file)
@@ -1,16 +1,13 @@
+<!DOCTYPE html>
 <html>
   <head>
+    <link rel="stylesheet" href="../dist/dygraph.css">
     <title>Test of number formatting</title>
-    <!--[if IE]>
-    <script type="text/javascript" src="../excanvas.js"></script>
-    <![endif]-->
-    <script type="text/javascript" src="../strftime/strftime-min.js"></script>
-    <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
-    <script type="text/javascript" src="../dygraph-canvas.js"></script>
-    <script type="text/javascript" src="../dygraph.js"></script>
+    <script type="text/javascript" src="../dist/dygraph.js"></script>
+
   </head>
   <body>
-    <p>The default formatting mimicks printf with %.<i>p</i>g where <i>p</i> is
+    <p>The default formatting mimics printf with %.<i>p</i>g where <i>p</i> is
        the precision to use.  It turns out that JavaScript's toPrecision()
        method is almost but not exactly equal to %g; they differ for values
        with small absolute values (10^-1 to 10^-5 or so), with toPrecision()
       };
 
       updateTable = function() {
-        var headers = ['Dygraph.defaultFormat()', 'toPrecision()',
-                       'Dygraph.defaultFormat()', 'toPrecision()'];
+        var headers = ['Dygraph.floatFormat()', 'toPrecision()',
+                       'Dygraph.floatFormat()', 'toPrecision()'];
         var numbers = [];
         var p = parseInt(document.getElementById('p_input').value);
 
         for (var i = -10; i <= 10; i++) {
           var n = Math.pow(10, i);
-          numbers.push([Dygraph.defaultFormat(n, p),
+          numbers.push([Dygraph.floatFormat(n, p),
                         n.toPrecision(p),
-                        Dygraph.defaultFormat(Math.PI * n, p),
+                        Dygraph.floatFormat(Math.PI * n, p),
                         (Math.PI * n).toPrecision(p)]);
         }
 
         // Check exact values of 0.
-        numbers.push([Dygraph.defaultFormat(0.0, p),
+        numbers.push([Dygraph.floatFormat(0.0, p),
                       0.0.toPrecision(p)]);
 
         var elem = document.getElementById('content');