Author: justi9
Date: 2008-04-15 11:10:04 -0400 (Tue, 15 Apr 2008)
New Revision: 1912
Modified:
mgmt/cumin/python/cumin/charts.py
mgmt/cumin/python/cumin/stat.py
mgmt/cumin/python/cumin/stat.strings
Log:
Use the passed in dimensions for to set the overall surface (and thus image) dimensions,
rather than just the internal chart subregion
Modified: mgmt/cumin/python/cumin/charts.py
===================================================================
--- mgmt/cumin/python/cumin/charts.py 2008-04-15 14:59:55 UTC (rev 1911)
+++ mgmt/cumin/python/cumin/charts.py 2008-04-15 15:10:04 UTC (rev 1912)
@@ -11,9 +11,9 @@
class TimeSeriesChart(object):
def __init__(self, width, height):
- self.width = width
- self.height = height
- self.surface = ImageSurface(FORMAT_ARGB32, width + 60, height + 20)
+ self.width = width - 60
+ self.height = height - 20
+ self.surface = ImageSurface(FORMAT_ARGB32, width, height)
self.surface.set_device_offset(0.5, 8.5)
self.x_max = 1
self.x_min = 0
Modified: mgmt/cumin/python/cumin/stat.py
===================================================================
--- mgmt/cumin/python/cumin/stat.py 2008-04-15 14:59:55 UTC (rev 1911)
+++ mgmt/cumin/python/cumin/stat.py 2008-04-15 15:10:04 UTC (rev 1912)
@@ -168,7 +168,7 @@
return (cls.get(id),)
def do_render(self, session, object):
- chart = TimeSeriesChart(320, 80)
+ chart = TimeSeriesChart(360, 100)
cls = self.class_.get(session)
stats = [getattr(cls, x) for x in self.stats.get(session)]
Modified: mgmt/cumin/python/cumin/stat.strings
===================================================================
--- mgmt/cumin/python/cumin/stat.strings 2008-04-15 14:59:55 UTC (rev 1911)
+++ mgmt/cumin/python/cumin/stat.strings 2008-04-15 15:10:04 UTC (rev 1912)
@@ -105,7 +105,7 @@
[StatValueChart.html]
<table class="StatValueChart" id="{id}">
<tr>
- <td><img id="{id}" src="{href}" height="100"
width="380"/></td>
+ <td><img id="{id}" src="{href}" height="100"
width="360"/></td>
<td>
<ul>{stats}</ul>
<br/>
Show replies by date