Author: eallen
Date: 2010-10-25 11:02:59 -0400 (Mon, 25 Oct 2010)
New Revision: 4401
Modified:
mgmt/trunk/cumin/python/cumin/stat.py
Log:
Prevent the max y-axis value for percent charts from being over 100.
Modified: mgmt/trunk/cumin/python/cumin/stat.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/stat.py 2010-10-25 14:54:50 UTC (rev 4400)
+++ mgmt/trunk/cumin/python/cumin/stat.py 2010-10-25 15:02:59 UTC (rev 4401)
@@ -1211,6 +1211,8 @@
min_val = (min_val / total) * 100.0
max_val = round(max_val * 1.1 + 1)
+ # cap at 100
+ max_val = min(max_val, 100.0)
if min_val < 0:
min_val = round(min_val * 1.1 - 1)
Show replies by date