From 912ac239b2fdfda899d6fd2c98cd4d3b8ededdcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 20 Apr 2008 01:22:37 +0200 Subject: [PATCH] Don't store labels in rectangle --- tryton/gui/window/view_form/view/graph_gtk/bar.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tryton/gui/window/view_form/view/graph_gtk/bar.py b/tryton/gui/window/view_form/view/graph_gtk/bar.py index 657306bfb9..71717ffa93 100644 --- a/tryton/gui/window/view_form/view/graph_gtk/bar.py +++ b/tryton/gui/window/view_form/view/graph_gtk/bar.py @@ -55,7 +55,7 @@ class Bar(Graph): bar.highlight = True label = locale.format('%.2f', bar.yval, True) label += '\n' - label += bar.xname + label += str(self.labels[bar.xname]) self.popup.set_text(label) self.queue_draw() else: @@ -101,8 +101,7 @@ class VerticalBar(Bar): h = abs(h) y -= h - rect = Rect(x, y, w, h, xval, yval, - str(self.labels[xfield]), yfield) + rect = Rect(x, y, w, h, xval, yval, xfield, yfield) if (0.0 <= rect.x <= 1.0) and (0.0 <= rect.y <= 1.0): self.bars.append(rect) @@ -146,8 +145,7 @@ class HorizontalBar(Bar): w = abs(w) x -= w - rect = Rect(x, y, w, h, xval, yval, - str(self.labels[xfield]), yfield) + rect = Rect(x, y, w, h, xval, yval, xfield, yfield) if (0.0 <= rect.x <= 1.0) and (0.0 <= rect.y <= 1.0): self.bars.append(rect)