Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -120,12 +120,13 @@ def apply_font_to_all_text(fig):
|
|
| 120 |
# 設定到極座標軸
|
| 121 |
if hasattr(fig, 'layout') and hasattr(fig.layout, 'polar') and hasattr(fig.layout.polar, 'radialaxis'):
|
| 122 |
fig.layout.polar.radialaxis.tickfont.family = "Microsoft JhengHei, Noto Sans CJK, Arial"
|
| 123 |
-
|
| 124 |
-
|
|
|
|
| 125 |
if hasattr(fig, 'layout') and hasattr(fig.layout, 'polar') and hasattr(fig.layout.polar, 'angularaxis'):
|
| 126 |
fig.layout.polar.angularaxis.tickfont.family = "Microsoft JhengHei, Noto Sans CJK, Arial"
|
| 127 |
-
|
| 128 |
-
|
| 129 |
|
| 130 |
return fig
|
| 131 |
|
|
|
|
| 120 |
# 設定到極座標軸
|
| 121 |
if hasattr(fig, 'layout') and hasattr(fig.layout, 'polar') and hasattr(fig.layout.polar, 'radialaxis'):
|
| 122 |
fig.layout.polar.radialaxis.tickfont.family = "Microsoft JhengHei, Noto Sans CJK, Arial"
|
| 123 |
+
if hasattr(fig.layout.polar.radialaxis, 'title'): # 先檢查是否有 title 屬性
|
| 124 |
+
if hasattr(fig.layout.polar.radialaxis.title, 'font'): # 再檢查 title 屬性是否有 font
|
| 125 |
+
fig.layout.polar.radialaxis.title.font.family = "Microsoft JhengHei, Noto Sans CJK, Arial" # 極座標 title
|
| 126 |
if hasattr(fig, 'layout') and hasattr(fig.layout, 'polar') and hasattr(fig.layout.polar, 'angularaxis'):
|
| 127 |
fig.layout.polar.angularaxis.tickfont.family = "Microsoft JhengHei, Noto Sans CJK, Arial"
|
| 128 |
+
# if hasattr(fig.layout, 'polar') and hasattr(fig.layout.polar, 'angularaxis', 'title'):
|
| 129 |
+
# fig.layout.polar.angularaxis.title.font.family = "Microsoft JhengHei, Noto Sans CJK, Arial" # 極座標 title
|
| 130 |
|
| 131 |
return fig
|
| 132 |
|