Fix slash in pychart

bzr revid: ced-5c8f972b643c254e39da5beefb0736a2a84f2c01
This commit is contained in:
ced 2006-12-12 08:55:10 +00:00
parent 357d945ee5
commit 3d1dd15a3b
3 changed files with 7 additions and 1 deletions

View File

@ -138,7 +138,7 @@ class report_custom(report_int):
f = fill_style.Plain()
f.bgcolor = colors[user_id]
ar.add_plot(bar_plot.T(label=users_name.get(user,'Unknown'), data=data, hcol=user_id+1, cluster=(user_id, len(datas['users_id'])), fill_style=f ))
ar.add_plot(bar_plot.T(label=users_name.get(user,'Unknown').replace('/', '//'), data=data, hcol=user_id+1, cluster=(user_id, len(datas['users_id'])), fill_style=f ))
ar.draw(can)
can.close()

View File

@ -17,6 +17,10 @@ class GanttCanvas(object):
self._max = 0
def add(self, user, name, datas):
if hasattr(user, 'replace'):
user=user.replace('/', '//')
if hasattr(name, 'replace'):
name=name.replace('/', '//')
if user not in self._datas:
self._datas[user] = []
for f in datas:

View File

@ -17,6 +17,8 @@ class stock_graph(object):
self.val_max = ''
def add(self, product_id, product_name, datas):
if hasattr(product_name, 'replace'):
product_name=product_name.replace('/', '//')
if product_id not in self._datas:
self._datas[product_id] = {}
self._names[product_id] = product_name