projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
todo is done
[dygraphs.git]
/
tests
/
labelsKMB.html
diff --git
a/tests/labelsKMB.html
b/tests/labelsKMB.html
index
0093b06
..
1a4d5c9
100644
(file)
--- a/
tests/labelsKMB.html
+++ b/
tests/labelsKMB.html
@@
-23,6
+23,9
@@
<p>labelsKMG2 with yValueFormatter:</p>
<div id="labelsKMG2yValueFormatter" style="width:600px; height: 300px;"></div>
<p>labelsKMG2 with yValueFormatter:</p>
<div id="labelsKMG2yValueFormatter" style="width:600px; height: 300px;"></div>
+ <p>labelsKMG2 with very small numbers:</p>
+ <div id="labelsKMG2SmallNumbers" style="width:600px; height: 300px;"></div>
+
<p>The curves are exponentials. Zooming in should reveal each of the 'K',
'M', 'B', etc. labels.</p>
<p>The curves are exponentials. Zooming in should reveal each of the 'K',
'M', 'B', etc. labels.</p>
@@
-32,9
+35,10
@@
return Math.round(num * shift)/shift;
};
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]);
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'];
}
var suffixes = ['', 'k', 'M', 'G', 'T'];
@@
-61,6
+65,11
@@
yValueFormatter: formatValue,
labels: ['Base', 'Power']
});
yValueFormatter: formatValue,
labels: ['Base', 'Power']
});
+
+ var g4 = new Dygraph(document.getElementById("labelsKMG2SmallNumbers"), smalldata, {
+ labelsKMG2: true,
+ labels: ['Base', 'Power']
+ });
</script>
</body>
</html>
</script>
</body>
</html>