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

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

  2. 在脚本里指定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

相关文章:

  • 2021-05-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
  • 2021-11-06
  • 2021-09-02
猜你喜欢
  • 2022-01-18
  • 2021-10-18
  • 2021-07-16
  • 2022-12-23
  • 2021-10-11
  • 2021-07-12
  • 2022-01-07
相关资源
相似解决方案