diff --git a/chart.py b/chart.py index 7505b60..83888d3 100644 --- a/chart.py +++ b/chart.py @@ -164,6 +164,7 @@ class QuantChart: cci_chart = chart.create_subchart( position=position, width=1, height=height, sync=True ) + cci_chart.layout(font_family="Times New Roman") cci_chart.legend( visible=True, font_size=14, color="#FFFFFF", font_family="Times New Roman" ) @@ -215,6 +216,7 @@ class QuantChart: macd_chart = chart.create_subchart( position=position, width=1, height=height, sync=True ) + macd_chart.layout(font_family="Times New Roman") macd_chart.legend( visible=True, font_size=14, color="#FFFFFF", font_family="Times New Roman" ) @@ -411,12 +413,11 @@ class QuantChart: self.check_df(df) chart = Chart(toolbox=True, inner_height=0.8, maximize=True) + chart.layout(font_family="Times New Roman") chart.topbar.textbox("symbol", symbol) chart.topbar.textbox("name", name) chart.topbar.textbox("timeframe", timeframe) - chart.legend( - visible=True, font_size=14, color="#FFFFFF", font_family="Times New Roman" - ) + chart.legend(visible=True, font_size=14, color="#FFFFFF") chart.set(df) # 设置刚进入chart时的可见k线数量范围