Python学习笔记——pyecharts(生成 Echarts 图表的类库)

一、开发文档

1.百度搜索 “pyecharts”

http://pyecharts.herokuapp.com/

2.进入Github

https://github.com/pyecharts/pyecharts

3.Github页面--安装 

#pip 安装

# 安装 v1 以上版本
$ pip install pyecharts -U

# 如果需要安装 0.5.11 版本的开发者,可以使用
# pip install pyecharts==0.5.11



#源码安装

# 安装 v1 以上版本
$ git clone https://github.com/pyecharts/pyecharts.git
# 如果需要安装 0.5.11 版本,请使用 git clone https://github.com/pyecharts/pyecharts.git -b v05x
$ cd pyecharts
$ pip install -r requirements.txt
$ python setup.py install

4、Github页面--打开开发文档

https://pyecharts.org/

二、书写技巧

1.查看源码,如果有继承的类,继续查看父类源码,直至找到__init__()方法。

2.发现构造方法里面的参数有默认值。所以在创建对象的时候何以不用写参数。

Python函数参数中的冒号与箭头:https://blog.csdn.net/tscaxx/article/details/104098911

3.将参数 init_opts = opts.InitOpts() 粘贴到构造方法里面

参数里面有构造方法,所以还要进一步判断,是否有参数需要再次设置。

发布了80 篇原创文章 · 获赞 4 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/tscaxx/article/details/104095933
今日推荐