=== modified file 'bin/tinygraph/__init__.py' --- bin/tinygraph/__init__.py 2010-12-07 14:24:00 +0000 +++ bin/tinygraph/__init__.py 2010-12-17 06:28:58 +0000 @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- ############################################################################## -# +# # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (). # @@ -15,7 +15,7 @@ # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . +# along with this program. If not, see . # ############################################################################## import tools @@ -64,12 +64,12 @@ else: data_all[d[axis[0]]][group_eval] = d[field] data_axis.append(data_all) - + axis_group = axis_group.keys() axis_group.sort() axis_lable = dic_lable.keys() axis_lable.sort() - + tmp = {} except_tmp = [] if axis_type == 'datetime': @@ -79,7 +79,7 @@ except: except_tmp += [lable] axis_lable = sorted(tmp, key=tmp.__getitem__) + except_tmp - + if axis_type == 'date': for lable in axis_lable: try: @@ -142,6 +142,7 @@ if True: if len(axis_group)>1: axis_group = map(lambda x: x.split('/')[-1], axis_group) + gvalue2 = map(lambda x:gvalue2[x], range(len(axis_group))) subplot.legend(gvalue2,axis_group,shadow=True,loc='best',prop = font_property) else: t1 = [ axis_data[x]['string'] for x in axis[1:]]