创建词云图组件,展示一个季度的关键词分布 Args: tab_name (str): 标签页名称,用于确定加载哪个词云图 Returns: Image: pyecharts Image 组件对象
(tab_name)
| 164 | wc_tab.add(wc, f"{tab_name}") |
| 165 | |
| 166 | def create_wordcloud_chart(tab_name): |
| 167 | """ |
| 168 | 创建词云图组件,展示一个季度的关键词分布 |
| 169 | |
| 170 | Args: |
| 171 | tab_name (str): 标签页名称,用于确定加载哪个词云图 |
| 172 | |
| 173 | Returns: |
| 174 | Image: pyecharts Image 组件对象 |
| 175 | """ |
| 176 | img = Image() |
| 177 | img.add(src=f"https://img.pythoncat.top/weekly_wordcloud_{tab_name[1]}.png", style_opts={ |
| 178 | "style": "max-width: 100%; height: auto; display: block; margin-left: auto; margin-right: auto;" |
| 179 | }) |
| 180 | return img |
| 181 | |
| 182 | def create_tabs_with_style(html_file): |
| 183 | """ |
no outgoing calls
no test coverage detected