【PythonAI】3.1.3 Pyecharts简介与优势(2. 基础使用模式)
# pyecharts_bar.pyfrompyecharts.chartsimportBarfrompyechartsimportoptionsasopts# 链式调用风格bar=(Bar().add_xaxis(["乌鲁木齐","阿克苏","伊犁"]).add_yaxis("GDP",[4502,1954,1568]).set_global_opts(title_opts=opts.TitleOpts(title="新疆GDP对比")))# 渲染为HTMLbar.render("chart.html")