網上資料大多數是0.5X的版本, 這裏我給出個人0.5版本鏈接https://www.cnblogs.com/dgwblog/p/11811562.htmlhtml
pyecharts 分爲 v0.5.X 和 v1 兩個大版本,v0.5.X 和 v1 間不兼容,v1 是一個全新的版本,詳見 ISSUE#892,ISSUE#1033。python
我我的認爲有必要學習新版本,結構清晰,支持鏈式調用git
新版本特性:github
打包須要的資源鏈接:app
https://github.com/pyecharts/pyecharts-assetsecharts
幾個網址:框架
http://pyecharts.herokuapp.com學習
https://github.com/pyecharts/pyecharts 項目地址ui
如何你要使用示例資源導入:spa
git clone https://github.com/pyecharts/pyecharts/tree/master/example
方便你操做的數據
from pyecharts import faker
pip 安裝
$ pip(3) install pyecharts
源碼安裝
$ git clone https://github.com/pyecharts/pyecharts.git $ cd pyecharts $ pip install -r requirements.txt $ python setup.py install # 或者執行 python install.py
# coding=utf-8 from pyecharts.charts import Bar from pyecharts import options as opts from pyecharts import faker from pyecharts.datasets import keys = ["襯衫", "羊毛衫", "雪紡衫", "褲子", "高跟鞋", "襪子"] values = [5, 20, 36, 10, 75, 90] # bar=(Bar() # .add_xaxis(keys) # .add_yaxis("商家A",values) # .set_global_opts(title_opts=opts.TitleOpts(title="主標題", subtitle="副標題")) # ) # bar.render() def demo() -> Bar(): c = ( Bar() .add_xaxis(keys) .add_yaxis("商家A", values) .set_global_opts(title_opts=opts.TitleOpts(title="主標題", subtitle="副標題"))) return c.render(); demo();