X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2Flogscale.html;h=df76edac60e2c543a172d2c312451605a37c89fb;hb=ed898bdd829370f5172a34d5f3d64858aeea16be;hp=9c17ead19ff7e3a28978e77ee447f235a61b2916;hpb=9da9874082de50040c37a771ef45aead75443a20;p=dygraphs.git diff --git a/tests/logscale.html b/tests/logscale.html index 9c17ead..df76eda 100644 --- a/tests/logscale.html +++ b/tests/logscale.html @@ -12,7 +12,10 @@

Log scale demo - work in progress

+

x-axis of dates

+

x-axis of numbers

+
@@ -27,21 +30,34 @@ "20101206,30\n"+ "20101207,80\n"+ "20101208,100\n"+ - "20101209,250\n"+ + "20101209,500\n"+ ""; } var g = new Dygraph(document.getElementById("div_g"), Data, { logscale : true }); - Dygraph.addEvent(g.canvas_, '_mousemove', function(e) { - var y = Dygraph.pageY(e) - Dygraph.findPosY(g.canvas_); - console.log(y, g.toDataYCoord(y)); - }); + function Data2() { + return "X,A\n" + + "1,0.000001\n"+ + "2,10\n"+ + "3,100\n"+ + "4,250\n"+ + "5,1000\n"+ + "6,30\n"+ + "7,80\n"+ + "8,100\n"+ + "9,500\n"+ + ""; + } + var g2 = new Dygraph(document.getElementById("div_g2"), + Data2, { logscale : true }); function logScale() { g.updateOptions({ logscale : true }); + g2.updateOptions({ logscale : true }); } function linearScale() { - g.updateOptions({ logscale : null }); + g.updateOptions({ logscale : false }); + g2.updateOptions({ logscale : false }); }