pyecharts 离线使用说明

离线使用
v1.0 之后,pyecharts 默认使用在线的 js asset 文件,如果没联网会导致生成 html 打开后是空白。离线使用需要指定为本地的 assets 路径。

下载 assets https://github.com/pyecharts/pyecharts-assets 解压缩。

在脚本里指定 asset 为上述目录

from pyecharts.globals import CurrentConfig, OnlineHostType
CurrentConfig.ONLINE_HOST = “/xx/pyecharts-assets-master/assets/”
Warning 消除
version 1.8.0 更新之后控制台会出现 PendingDeprecationWarning 的提示, 如需关闭,请在脚本加入如下代码:

from pyecharts.globals import WarningType
WarningType.ShowWarning = False