Author: croberts
Date: 2011-05-04 18:19:55 +0000 (Wed, 04 May 2011)
New Revision: 4751
Modified:
trunk/cumin/python/cumin/charts.py
trunk/cumin/python/cumin/stat.py
Log:
For charted values > 1000000, we are now labeling the y-axis in terms of "M"
instead of "K". This addresses BZ
https://bugzilla.redhat.com/show_bug.cgi?id=697093 .
Modified: trunk/cumin/python/cumin/charts.py
===================================================================
--- trunk/cumin/python/cumin/charts.py 2011-05-04 15:04:19 UTC (rev 4750)
+++ trunk/cumin/python/cumin/charts.py 2011-05-04 18:19:55 UTC (rev 4751)
@@ -365,8 +365,8 @@
value = fraction * self.y_max - self.y_min
value = int(round(value + self.y_min))
- if value >= 10000000:
- svalue = "%im" % int(round(value / 1000000.0, -1))
+ if value >= 1000000:
+ svalue = "%.2fm" % (round(value / 1000000.0, 2))
elif value >= 10000:
svalue = "%ik" % int(round(value / 1000.0, -1))
else:
Modified: trunk/cumin/python/cumin/stat.py
===================================================================
--- trunk/cumin/python/cumin/stat.py 2011-05-04 15:04:19 UTC (rev 4750)
+++ trunk/cumin/python/cumin/stat.py 2011-05-04 18:19:55 UTC (rev 4751)
@@ -939,8 +939,8 @@
if i % step == 0:
value = int(round(i * y_step, 0))
- if value >= 10000000:
- svalue = "%im" % int(round(value / 1000000.0, -1))
+ if value >= 1000000:
+ svalue = "%.2fm" % (round(value / 1000000.0, 2))
elif value >= 10000:
svalue = "%ik" % int(round(value / 1000.0, -1))
else: