X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=gallery%2Fstock.js;h=ad7319e7c099c610d0619d06313af876a79f6370;hb=ad9515f810131991ff323f6437623cc15a36c492;hp=0cee3fb26ed7cf8ddf86b42db7225068fff7ecb1;hpb=60bda09c058d85b1fad278ac4ce6df353e0a9275;p=dygraphs.git
diff --git a/gallery/stock.js b/gallery/stock.js
index 0cee3fb..ad7319e 100644
--- a/gallery/stock.js
+++ b/gallery/stock.js
@@ -1,14 +1,17 @@
+/*global Gallery,Dygraph,data */
+/*global stockData */
Gallery.register(
'stock',
{
name: 'Stock Chart Demo',
title: 'Stock Chart Demo',
setup: function(parent) {
- parent.innerHTML = "
" +
- "" +
- " " +
- "" +
- "
";
+ parent.innerHTML = [
+ "
",
+ "",
+ " ",
+ " ",
+ "
"].join("\n");
},
run: function() {
var g = new Dygraph(document.getElementById("stock_div"), stockData,
@@ -16,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
+ });