X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=gallery%2Fstock.js;h=ad7319e7c099c610d0619d06313af876a79f6370;hb=2a1f00d810b5c4f04b72bc6a393380b858f70909;hp=cb7fe3e03fa6aa8f9bfee1e74464a228e209290f;hpb=605b6119bcc80db4ea100d66df3483425dcd32af;p=dygraphs.git diff --git a/gallery/stock.js b/gallery/stock.js index cb7fe3e..ad7319e 100644 --- a/gallery/stock.js +++ b/gallery/stock.js @@ -1,3 +1,5 @@ +/*global Gallery,Dygraph,data */ +/*global stockData */ Gallery.register( 'stock', { @@ -5,8 +7,8 @@ Gallery.register( title: 'Stock Chart Demo', setup: function(parent) { parent.innerHTML = [ - "

", - "
", + "

", + "
", "  ", " ", "
"].join("\n"); @@ -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 + });