标签:install turn lan axis blog dataset 标题 alt pytho
网上资料大多数是0.5X的版本, 这里我给出我的0.5版本连接https://www.cnblogs.com/dgwblog/p/11811562.html
pyecharts 分为 v0.5.X 和 v1 两个大版本,v0.5.X 和 v1 间不兼容,v1 是一个全新的版本,详见 ISSUE#892,ISSUE#1033。
我个人认为有必要学习新版本,结构清晰,支持链式调用
新版本特性:
打包需要的资源连接:
https://github.com/pyecharts/pyecharts-assets
几个网址:
http://pyecharts.herokuapp.com
https://github.com/pyecharts/pyecharts 项目地址
如何你要使用示例资源导入:
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();
标签:install turn lan axis blog dataset 标题 alt pytho
原文地址:https://www.cnblogs.com/dgwblog/p/11813962.html