import pyecharts.options as opts
from pyecharts.charts import Line
locate = ['北京', '天津', '河北', '山西', '内蒙古', '辽宁', '吉林', '黑龙江', '上海', '江苏', '浙江', '安徽', '福建', '江西', '山东', '河南', '湖北', '湖南', '广东', '广西', '海南', '重庆', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆']

def line_base() -> Line:
    c = (
        Line()
        .add_xaxis(locate)
        .add_yaxis("个体就业数",[40.22, 106.54, 410.63, 261.16, 226.83, 296.69, 242.76, 346.92, 42.72, 834.82, 590.56, 635.59, 758.26, 311.18, 467.0, 691.9, 584.32, 324.04, 991.44, 304.27, 73.67, 267.98, 340.09, 175.77, 220.3, 44.17, 417.87, 114.87, 65.09, 57.09, 195.52])
        .add_yaxis("高校毕业生数", [12.03, 7.85, 17.14, 11.75, 5.8, 17.75, 11.31, 12.49, 8.58, 26.01, 14.93, 15.41, 12.1, 12.69, 23.96, 26.2, 20.4, 16.42, 25.4, 9.75, 2.49, 10.53, 18.64, 6.99, 9.57, 0.56, 16.96, 7.06, 0.83, 1.79, 3.45])
        .set_global_opts(title_opts=opts.TitleOpts(title="各省个体就业人数与高校毕业人数对比"))
    )
    return c
a = line_base()
a.render('line.html')