From f59de449782da76aa277569ec49c59d0c8da3bdf Mon Sep 17 00:00:00 2001 From: xinghuifeng Date: Tue, 31 Dec 2024 17:54:04 +0800 Subject: [PATCH] change bg-color to white --- etf_10year_pe.py | 2 +- etf_keypoint.py | 4 ++-- tools.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etf_10year_pe.py b/etf_10year_pe.py index 2bcfab2..9218020 100644 --- a/etf_10year_pe.py +++ b/etf_10year_pe.py @@ -118,7 +118,7 @@ def get_etf_10year_pe(): # 创建 Line 图表实例 line = ( - Line(init_opts=opts.InitOpts(width="3000px", height="1200px")) + Line(init_opts=opts.InitOpts(width="3000px", height="1200px", bg_color="white")) .add_xaxis(dates) .set_global_opts( title_opts=opts.TitleOpts(is_show=False), diff --git a/etf_keypoint.py b/etf_keypoint.py index 8868e29..5f38143 100644 --- a/etf_keypoint.py +++ b/etf_keypoint.py @@ -118,7 +118,7 @@ def get_etf_keypoint(): # 创建Bar对象 bar = ( - Bar(init_opts=opts.InitOpts(width="2400px", height="1600px")) + Bar(init_opts=opts.InitOpts(width="2400px", height="1600px", bg_color="white")) .add_xaxis(etf_names) .add_yaxis("major_support", major_supports, stack="stack1",bar_width="50%",gap="0%",itemstyle_opts=opts.ItemStyleOpts(color="#00da3c")) .add_yaxis("minor_support", minor_supports, stack="stack1",gap="0%",itemstyle_opts=opts.ItemStyleOpts(color="lightgreen")) @@ -137,7 +137,7 @@ def get_etf_keypoint(): .set_global_opts( title_opts=opts.TitleOpts(is_show=False), legend_opts=opts.LegendOpts(is_show=False), - tooltip_opts=opts.TooltipOpts(is_show=False) # 隐藏 tooltip + tooltip_opts=opts.TooltipOpts(is_show=False) ) .reversal_axis() ) diff --git a/tools.py b/tools.py index 484440a..782835b 100644 --- a/tools.py +++ b/tools.py @@ -76,7 +76,7 @@ def get_etf_year_close_line(etf_info_map): # 创建 Line 图表实例 line = ( - Line(init_opts=opts.InitOpts(width="2400px", height="1200px")) + Line(init_opts=opts.InitOpts(width="2400px", height="1200px", bg_color="white")) .add_xaxis(dates) .set_series_opts(label_opts=opts.LabelOpts(is_show=False)) # 隐藏数据标签 )