-
- vl = Label(self, text=v)
- vl.grid(row=i, column=1, sticky=W)
+
+ if not timeBased :
+ vl = Label(self, text=v)
+ vl.grid(row=i, column=1, sticky=W)
+ else :
+ maxv = max(v)
+ if maxv :
+ cw, ch = 200, 100
+ c = Canvas(self, background='#fff', width=cw, height=ch)
+ rectW = int(float(cw) / len(v))
+ unitRectH = float(ch) / maxv
+ for j, fv in enumerate(v) :
+ if not fv : continue
+ x0 = j * rectW
+ y0 = ch - int(unitRectH * fv)
+ x1 = (j + 1) * rectW
+ y1 = ch
+ c.create_rectangle(x0, y0, x1, y1, fill="#9085ba")
+ c.grid(row=i, column=1, sticky=W)
+
+ else :
+ vl = Label(self, text='—')
+ vl.grid(row=i, column=1, sticky=W)