样式修改

parent 3bfa1177
......@@ -1279,7 +1279,7 @@
</div>
<table border="1">
<tr>
<th>现有配置资金</th>
<th>现有配置资金(万元)</th>
<th>现有年化收益情况(%)</th>
<th>现有最大回撤(%)</th>
</tr>
......@@ -1291,7 +1291,7 @@
</table>
<table border="1" style="margin: 0;">
<tr>
<th>计划配置资金</th>
<th>计划配置资金(万元)</th>
<th>目标年化收益情况(%)</th>
<th>目标最大回撤(%)</th>
</tr>
......@@ -1575,7 +1575,8 @@
<tr>
<th rowspan="2">基金简称</th>
<th rowspan="2">申购净值</th>
<th colspan="9">最新净值(2020.11.05)</th>
<th colspan="2">最新净值({{latest_worth_day}})</th>
<th colspan="7">收益率(%)</th>
<th rowspan="2">分红</th>
</tr>
<tr>
......
......@@ -40,14 +40,14 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
max_x_count = max([x['data'].size for x in product_list])
loc = np.arange(max_x_count) # the x locations for the groups
width = 0.35 # the width of the bars: can also be len(x) sequence
color_list = ['#222A77', '#6C71AA', '#E1BC95', '#F9DBB8']
color_list = ['#B0B0B0', '#6C71AA', '#E1BC95', '#F9DBB8']
# 坐标轴
ax1.tick_params(labelsize=fontsize)
ax2.tick_params(labelsize=fontsize)
# 坐标轴颜色
ax2.tick_params(axis='y', colors='#C6A774')
ax2.tick_params(axis='y', colors='#D40000')
ax1.set_xticks(loc)
ax1.set_xticklabels(xlabels)
# ax1.yaxis.set_major_formatter(FuncFormatter(to_percent))
......@@ -81,10 +81,10 @@ def draw_month_return_chart(xlabels, product_list, cumulative):
ax1.legend(prod_legend, [prod['name'] for prod in product_list], loc='upper left', fontsize=fontsize)
# 画折线图
ax2.plot(loc, cumulative['data'], color='#C6A774', marker='', linewidth=3, label=cumulative['name'])
ax2.plot(loc, cumulative['data'], color='#D40000', marker='.', linewidth=3, label=cumulative['name'])
# 添加数字标签
for a, b in zip(range(len(xlabels)), cumulative['data']):
ax2.text(a, b + 0.1, '%.2f' % b + '%', ha='center', va='bottom', fontsize=fontsize)
ax2.text(a+0.2, b + 0.1, '%.2f' % b + '%', ha='center', va='bottom', fontsize=fontsize, color='#D40000')
ax2.legend(loc='upper center', fontsize=fontsize)
# plt.show()
......@@ -110,7 +110,7 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
max_x_count = max([x['data'].size for x in product_list])
loc = np.arange(max_x_count) # the x locations for the groups
width = 0.35 # the width of the bars: can also be len(x) sequence
color_list = ['#222A77', '#6C71AA', '#E1BC95', '#F9DBB8']
color_list = ['#333333', '#928C8C', '#F9A3A3', '#FFDBDB']
# 坐标轴
ax1.tick_params(labelsize=fontsize)
......@@ -142,7 +142,7 @@ def draw_contribution_chart(xlabels, product_list, cumulative):
ax1.legend(prod_legend, [prod['name'] for prod in product_list], bbox_to_anchor=(0.9, -0.1), ncol=4, fontsize=fontsize)
# 画折线图
ax2.plot(loc, cumulative['data'], color='#C6A774', marker='', linewidth=3, label=cumulative['name'])
ax2.plot(loc, cumulative['data'], color='#B40A15', marker='', linewidth=3, label=cumulative['name'])
ax2.legend(loc='upper left', fontsize=fontsize)
imgdata = BytesIO()
......
......@@ -41,18 +41,19 @@ def gen_radar_chart(radar_chart_data):
# ],
splitarea_opt=opts.SplitAreaOpts(
is_show=True, areastyle_opts=opts.AreaStyleOpts(opacity=1, color=[
'rgba(198, 167, 116, 0.5)',
'rgba(198, 167, 116, 0.4)',
'rgba(198, 167, 116, 0.3)',
'rgba(198, 167, 116, 0.2)',
'rgba(198, 167, 116, 0.1)',
'rgba(194, 194, 194, 0.5)',
'rgba(232, 232, 232, 1)',
'rgba(242, 242, 242, 1)',
'rgba(247, 247, 247, 0.92)',
'rgba(247, 247, 247, 0.5)',
])
),
textstyle_opts=opts.TextStyleOpts(color="#000", font_size=16),
textstyle_opts=opts.TextStyleOpts(color="#000", font_size=14),
).add(
series_name="预算分配(Allocated Budget)",
data=v1,
linestyle_opts=opts.LineStyleOpts(width=2, color="#C6A774"),
linestyle_opts=opts.LineStyleOpts(width=2, color="#999999"),
tooltip_opts=None
).set_series_opts(label_opts=opts.LabelOpts(is_show=False)).set_global_opts(
title_opts=opts.TitleOpts(
......@@ -62,7 +63,7 @@ def gen_radar_chart(radar_chart_data):
'lineHeight': 20,
'fontWeight': 'normal'
},
subtitle_textstyle_opts={'color': '#222A77',
subtitle_textstyle_opts={'color': '#983612' if radar_chart_data['data'][5]['data'] > 60 else '#22999F',
'fontSize': 20,
'lineHeight': 23,
'fontWeight': 'bolder',
......
......@@ -51,7 +51,7 @@ with TAMP_SQL(tamp_user_engine) as tamp_user, TAMP_SQL(tamp_order_engine) as tam
tamp_order_session = tamp_order.session
# for ifauser in ifausers:
for ifauser in ifausers[1000:2000]:
for ifauser in ifausers[100:1000]:
# 获取某个 ifa 的所有 customer
customers = tamp_order_session.query(Ifa_Customer).\
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