X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=tests%2FlabelsKMB.html;fp=tests%2FlabelsKMB.html;h=1a4d5c9476a62545721e06cdfe2a769006ca4b68;hb=e11c15fd04a8848a1fe695bfb1892571ff06deb5;hp=0093b06a6258aef2ca4d527ce354cbad2699b9fa;hpb=c2cba2c887e15f43ee35f7714d96f27b02928d12;p=dygraphs.git diff --git a/tests/labelsKMB.html b/tests/labelsKMB.html index 0093b06..1a4d5c9 100644 --- a/tests/labelsKMB.html +++ b/tests/labelsKMB.html @@ -23,6 +23,9 @@

labelsKMG2 with yValueFormatter:

+

labelsKMG2 with very small numbers:

+
+

The curves are exponentials. Zooming in should reveal each of the 'K', 'M', 'B', etc. labels.

@@ -32,9 +35,10 @@ return Math.round(num * shift)/shift; }; - var data = []; + var data = [], smalldata = []; for (var i = 0, n = 1; i < 63; i++, n *= 2) { data.push([i, n]); + smalldata.push([i, Math.pow(10,-n)]); } var suffixes = ['', 'k', 'M', 'G', 'T']; @@ -61,6 +65,11 @@ yValueFormatter: formatValue, labels: ['Base', 'Power'] }); + + var g4 = new Dygraph(document.getElementById("labelsKMG2SmallNumbers"), smalldata, { + labelsKMG2: true, + labels: ['Base', 'Power'] + });