X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Fstock.js;h=ad7319e7c099c610d0619d06313af876a79f6370;hb=2a1f00d810b5c4f04b72bc6a393380b858f70909;hp=4c6af6d4740855daffa11b0c88e25231aee3d1ef;hpb=56f64289bdbd75dea1ee58faf529d39465d11008;p=dygraphs.git diff --git a/gallery/stock.js b/gallery/stock.js index 4c6af6d..ad7319e 100644 --- a/gallery/stock.js +++ b/gallery/stock.js @@ -1,3 +1,5 @@ +/*global Gallery,Dygraph,data */ +/*global stockData */ Gallery.register( 'stock', { @@ -17,15 +19,15 @@ Gallery.register( customBars: true, logscale: true }); - + 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); }; } - }); \ No newline at end of file + });