File size: 741 Bytes
c2f20b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Project      : AI.  @by PyCharm
# @File         : pyecharts
# @Time         : 2023/4/25 19:52
# @Author       : betterme
# @WeChat       : meutils
# @Software     : PyCharm
# @Description  : 

from meutils.pipe import *
import streamlit as st
from pyecharts import options as opts
from pyecharts.charts import Bar
from streamlit_echarts import st_pyecharts

st.title('测试')

bar = Bar()

# 添加数据和配置项
bar.add_xaxis(['a', 'b', 'c'])
bar.add_yaxis('', [200, 100, 300])
bar.set_global_opts(
    title_opts=opts.TitleOpts(title="测试图"),
    xaxis_opts=opts.AxisOpts(name=''),
    yaxis_opts=opts.AxisOpts(name=''),
)

# 在 Streamlit 页面上显示图表
st_pyecharts(bar)