X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;ds=inline;f=gallery%2Ftwo-axes.js;h=fae6c899886852a5b15840a57c189a3b0c041c61;hb=80be397c6428c0015c21f4a4ac96e222eb51f67e;hp=a93beed1a93da03d13435f52421deec74f663bfa;hpb=e26b71566419e1c051f3fbd1f4f8f64b063a04c9;p=dygraphs.git diff --git a/gallery/two-axes.js b/gallery/two-axes.js index a93beed..fae6c89 100644 --- a/gallery/two-axes.js +++ b/gallery/two-axes.js @@ -1,9 +1,10 @@ +/*global Gallery,Dygraph,data */ Gallery.register( 'two-axes', { name: "Multiple y-axes", setup: function(parent) { - parent.innerHTML = + parent.innerHTML = "
The same data with both one and two y-axes. Two y-axes:
" + "" + "A single y-axis:
" + @@ -11,10 +12,11 @@ Gallery.register( ""; }, run: function() { - document.getElementById('check') = function(el) { + var g, g2; + document.getElementById('check').onchange = function(el) { g.updateOptions( { fillGraph: el.checked } ); g2.updateOptions( { fillGraph: el.checked } ); - } + }; var data = []; for (var i = 1; i <= 100; i++) { @@ -62,7 +64,7 @@ Gallery.register( labels: [ 'Date', 'Y1', 'Y2', 'Y3', 'Y4' ], labelsKMB: true, ylabel: 'Primary y-axis', - y2label: 'Secondary y-axis', + y2label: 'Secondary y-axis' } ); }