Author: croberts
Date: 2011-10-04 20:36:30 +0000 (Tue, 04 Oct 2011)
New Revision: 5040
Modified:
trunk/cumin/python/cumin/stat.py
Log:
Addressing BZ 725451 by limiting the PNG chart max y value to 100 when displaying a
percentage chart. This matches the maximum value of 100 for percentage charts in the
flash charts.
Modified: trunk/cumin/python/cumin/stat.py
===================================================================
--- trunk/cumin/python/cumin/stat.py 2011-10-04 19:18:55 UTC (rev 5039)
+++ trunk/cumin/python/cumin/stat.py 2011-10-04 20:36:30 UTC (rev 5040)
@@ -556,6 +556,10 @@
min_value = float(min_value)
max_value = round(max_value * 1.1 + 1)
+ if type == "percent" and max_value > 100:
+ # since none of our percentage graphs go above 100%
+ # we limit it here to match the flash graph
+ max_value = 100
if min_value < 0:
min_value = round(min_value * 1.1 - 1)
Show replies by date