Skip to content

Commit

Permalink
change bg-color to white
Browse files Browse the repository at this point in the history
  • Loading branch information
xinghuifeng committed Dec 31, 2024
1 parent 5dfcb18 commit f59de44
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion etf_10year_pe.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions etf_keypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand All @@ -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()
)
Expand Down
2 changes: 1 addition & 1 deletion tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)) # 隐藏数据标签
)
Expand Down

0 comments on commit f59de44

Please sign in to comment.