import pyecharts.options as opts
from pyecharts.charts import Bar, Line
x_data = ["2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021"]
y_axis = [87430,90912,96225,101885,107147,116390,105764,120215]
bar = (
Bar()
.add_xaxis(xaxis_data=x_data)
.add_yaxis("诊疗量(万人次)",
y_axis,
yaxis_index=0,
color="orange",
label_opts=opts.LabelOpts(is_show=False),
)
.extend_axis(
yaxis=opts.AxisOpts(
name="同比增速(%)",
type_="value",
min_=-20,
max_=20,
interval=10,
axislabel_opts=opts.LabelOpts(formatter="{value} °C"),
)
)
.set_global_opts(
title_opts=opts.TitleOpts(title="中国中医类医疗卫生机构诊疗量"),
toolti
pyecharts模块做柱形图和折线图组合
最新推荐文章于 2024-07-15 15:37:59 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)