pyecharts主题河流图

开始在生死边缘疯狂试探

数据要求还是比较严格,经常会绘制图片失败或是出错,暂时不知道什么原因

from pyecharts.render import make_snapshot
from snapshot_selenium import snapshot
def themeriverDraw(wordData, dataInfo):
    c = (
        ThemeRiver(init_opts=opts.InitOpts(bg_color="white"))
        .add(
            wordData,
            dataInfo,
            singleaxis_opts=opts.SingleAxisOpts(type_="time", pos_bottom="10%"),
        )
        .set_global_opts(
            title_opts=opts.TitleOpts(title=title),
            legend_opts=opts.LegendOpts(pos_left="20%")
        )
    )
    return c
make_snapshot(snapshot, themeriverDraw(word_data, data_info).render(), outFile)
pyecharts主题河流图_第1张图片
pyecharts主题河流图_第2张图片

你可能感兴趣的:(pyecharts主题河流图)