Author: croberts
Date: 2011-11-03 15:12:45 +0000 (Thu, 03 Nov 2011)
New Revision: 5110
Modified:
branches/noflash/cumin/resources/app.js
Log:
Attempt to make y-axis values smarter for large values (> 10k)
Modified: branches/noflash/cumin/resources/app.js
===================================================================
--- branches/noflash/cumin/resources/app.js 2011-11-03 15:07:34 UTC (rev 5109)
+++ branches/noflash/cumin/resources/app.js 2011-11-03 15:12:45 UTC (rev 5110)
@@ -629,10 +629,14 @@
if (!format) {
format = $j.jqplot.config.defaultTickFormatString;
}
- if (val > 10000000) {
- val = val / 1000000
+ if (val > 1000000) {
+ val = val / 100000
format = "%.2fM";
}
+ if (val > 10000) {
+ val = val / 100
+ format = "%.2fk";
+ }
tickval = $j.jqplot.sprintf(format, val);
}
Show replies by date