标签位置

parent d376ee92
...@@ -74,9 +74,9 @@ def draw_month_return_chart(xlabels, product_list, cumulative): ...@@ -74,9 +74,9 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
ax = ax1.bar(loc, product_list[i]['data'], width, bottom=bottom, alpha=0.8) ax = ax1.bar(loc, product_list[i]['data'], width, bottom=bottom, alpha=0.8)
for a, b in zip(range(len(xlabels)), product_list[0]['data']): for a, b in zip(range(len(xlabels)), product_list[0]['data']):
if b > 0: if b > 0:
ax1.text(a, b+0.2, '%.0f万' % b, ha='center', va='bottom', fontsize=fontsize) ax1.text(a, b+0.1, '%.2f万' % b, ha='center', va='bottom', fontsize=fontsize)
elif b < 0: elif b < 0:
ax1.text(a, b-0.5, '%.0f万' % b, ha='center', va='top', fontsize=fontsize) ax1.text(a, b-0.1, '%.2f万' % b, ha='center', va='top', fontsize=fontsize)
prod_legend.append(ax[0]) prod_legend.append(ax[0])
ax1.legend(prod_legend, [prod['name'] for prod in product_list], loc='upper left', fontsize=fontsize) ax1.legend(prod_legend, [prod['name'] for prod in product_list], loc='upper left', fontsize=fontsize)
......
...@@ -51,8 +51,7 @@ with TAMP_SQL(tamp_user_engine) as tamp_user, TAMP_SQL(tamp_order_engine) as tam ...@@ -51,8 +51,7 @@ with TAMP_SQL(tamp_user_engine) as tamp_user, TAMP_SQL(tamp_order_engine) as tam
tamp_order_session = tamp_order.session tamp_order_session = tamp_order.session
# for ifauser in ifausers: # for ifauser in ifausers:
for ifauser in ifausers[:5]: for ifauser in ifausers[1000:2000]:
# 获取某个 ifa 的所有 customer # 获取某个 ifa 的所有 customer
customers = tamp_order_session.query(Ifa_Customer).\ customers = tamp_order_session.query(Ifa_Customer).\
filter_by(ifa_id = ifauser.id).all() filter_by(ifa_id = ifauser.id).all()
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment