projects
/
dygraphs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7201b11
)
* Altered formatting to use the shorter of floatFormat() or intFormat(). This
author
Jeremy Brewer
<jeremy.d.brewer@gmail.com>
Fri, 4 Feb 2011 21:15:43 +0000
(16:15 -0500)
committer
Jeremy Brewer
<jeremy.d.brewer@gmail.com>
Fri, 4 Feb 2011 21:15:43 +0000
(16:15 -0500)
seems to fix all of the known formatting problems.
dygraph.js
patch
|
blob
|
blame
|
history
diff --git
a/dygraph.js
b/dygraph.js
index
14b4994
..
1257b23
100644
(file)
--- a/
dygraph.js
+++ b/
dygraph.js
@@
-149,7
+149,11
@@
Dygraph.DEFAULT_ATTRS = {
labelsKMG2: false,
showLabelsOnHighlight: true,
- yValueFormatter: Dygraph.floatFormat,
+ yValueFormatter: function(x, opt_precision) {
+ var s = Dygraph.floatFormat(x, opt_precision);
+ var s2 = Dygraph.intFormat(x);
+ return s.length <= s2.length ? s : s2;
+ },
strokeWidth: 1.0,