pyecharts探索
Posted jade-north
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了pyecharts探索相关的知识,希望对你有一定的参考价值。
终于找到一个能用的demo,待完善
1 # coding=utf-8 2 from pyecharts.charts import Bar 3 from pyecharts import options as opts 4 from pyecharts import faker 5 # from pyecharts.datasets import 6 7 keys = ["衬衫", "羊毛衫", "雪纺衫", "裤子", "高跟鞋", "袜子"] 8 values = [5, 20, 36, 10, 75, 90] 9 10 # bar=(Bar() 11 # .add_xaxis(keys) 12 # .add_yaxis("商家A",values) 13 # .set_global_opts(title_opts=opts.TitleOpts(title="主标题", subtitle="副标题")) 14 # ) 15 # bar.render() 16 17 def demo() -> Bar(): 18 c = ( 19 Bar() 20 .add_xaxis(keys) 21 .add_yaxis("商家A", values) 22 .set_global_opts(title_opts=opts.TitleOpts(title="主标题", subtitle="副标题"))) 23 return c.render(); 24 demo()
以上是关于pyecharts探索的主要内容,如果未能解决你的问题,请参考以下文章