projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove code that clamps horizontal hover to the final point. I don't think
[dygraphs.git]
/
tests
/
labelsKMB.html
diff --git
a/tests/labelsKMB.html
b/tests/labelsKMB.html
index
760411b
..
005e8ef
100644
(file)
--- a/
tests/labelsKMB.html
+++ b/
tests/labelsKMB.html
@@
-2,9
+2,10
@@
<head>
<title>labelsKMB</title>
<!--[if IE]>
<head>
<title>labelsKMB</title>
<!--[if IE]>
- <script type="text/javascript" src="excanvas.js"></script>
+ <script type="text/javascript" src="
../
excanvas.js"></script>
<![endif]-->
<![endif]-->
- <script type="text/javascript" src="../dygraph-combined.js"></script>
+ <script type="text/javascript" src="../strftime/strftime-min.js"></script>
+ <script type="text/javascript" src="../rgbcolor/rgbcolor.js"></script>
<script type="text/javascript" src="../dygraph-canvas.js"></script>
<script type="text/javascript" src="../dygraph.js"></script>
</head>
<script type="text/javascript" src="../dygraph-canvas.js"></script>
<script type="text/javascript" src="../dygraph.js"></script>
</head>
@@
-22,6
+23,11
@@
'M', 'B', etc. labels.</p>
<script type="text/javascript">
'M', 'B', etc. labels.</p>
<script type="text/javascript">
+ function round(num, places) {
+ var shift = Math.pow(10, places);
+ return Math.round(num * shift)/shift;
+ };
+
var data = [];
for (var i = 0, n = 1; i < 43; i++, n *= 2) {
data.push([i, n]);
var data = [];
for (var i = 0, n = 1; i < 43; i++, n *= 2) {
data.push([i, n]);
@@
-34,7
+40,7
@@
var magnitude = Math.floor(String(Math.floor(v)).length / 3);
if (magnitude > suffixes.length - 1)
magnitude = suffixes.length - 1;
var magnitude = Math.floor(String(Math.floor(v)).length / 3);
if (magnitude > suffixes.length - 1)
magnitude = suffixes.length - 1;
- return String(
g.round_
(v / Math.pow(10, magnitude * 3), 2)) +
+ return String(
round
(v / Math.pow(10, magnitude * 3), 2)) +
suffixes[magnitude];
}
suffixes[magnitude];
}