X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Fstock.js;h=ad7319e7c099c610d0619d06313af876a79f6370;hb=2a1f00d810b5c4f04b72bc6a393380b858f70909;hp=511aef195f35fa74c537efb0b688398ce8f87b7e;hpb=5a46df4c8041636edfb09702b43d62126c066911;p=dygraphs.git diff --git a/gallery/stock.js b/gallery/stock.js index 511aef1..ad7319e 100644 --- a/gallery/stock.js +++ b/gallery/stock.js @@ -1,3 +1,5 @@ +/*global Gallery,Dygraph,data */ +/*global stockData */ Gallery.register( 'stock', { @@ -20,12 +22,12 @@ Gallery.register( var linear = document.getElementById("linear"); var log = document.getElementById("log"); - linear.onclick = function() { setLog(false); }; - log.onclick = function() { setLog(true); }; var setLog = function(val) { g.updateOptions({ logscale: val }); linear.disabled = !val; log.disabled = val; }; + linear.onclick = function() { setLog(false); }; + log.onclick = function() { setLog(true); }; } });