X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=gallery%2Fnumber-format.js;h=2f61cf3dde4d8152c72d16a43b6e9174f8799934;hb=a12a78ae06c196aa0d3211ab57b584367504b9a0;hp=6a20e3c57b29ca045a3d14c7fa265db13a615b17;hpb=795b16307db2a673ba7aa3452f6f6b0e93baeb3a;p=dygraphs.git diff --git a/gallery/number-format.js b/gallery/number-format.js index 6a20e3c..2f61cf3 100644 --- a/gallery/number-format.js +++ b/gallery/number-format.js @@ -15,7 +15,7 @@ Gallery.register( " variety of precisions.
" + "Precision to use (1 to 21):" + - "
" + + " " + "" + ""; }, @@ -50,7 +50,7 @@ Gallery.register( return table; }; - window.updateTable = function() { + updateTable = function() { var headers = ['Dygraph.floatFormat()', 'toPrecision()', 'Dygraph.floatFormat()', 'toPrecision()']; var numbers = []; @@ -74,6 +74,7 @@ Gallery.register( }; document.getElementById('p_input').value = '4'; + document.getElementById('p_input').onchange = updateTable; updateTable(); } });