# 分类名称 # LeiXing = [] # 城区 # CityArea = [] # 镇区 # ZhenArea = [] from pyecharts import options as opts from pyecharts.charts import Bar c = ( Bar() .add_xaxis(LeiXing) .add_yaxis("城区", CityArea) .add_yaxis("乡镇", ZhenArea) .set_global_opts(title_opts=opts.TitleOpts(title="项目单位情况", subtitle="")) .dump_options() ) print(c)