python使用pyecharts

2022-07-14  本文已影响0人  木火应
pip install pyecharts==0.5.11
pip install pyecharts-snapshot==0.1.10
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
cd phantomjs-2.1.1-linux-x86_64/bin
chmod a+x phantomjs
sudo ln -s xxx/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
# python
>>>from pyecharts import Bar, Line, Pie, Grid,configure
>>>from pyecharts_snapshot.main import make_a_snapshot
>>>make_a_snapshot("file.html","file.png",pixel_ratio=1)
上一篇 下一篇

猜你喜欢

热点阅读