用于python的echarts绑定
echarts-python的Python项目详细描述
使用Python的非官方Echarts选项生成器
- 自由软件:麻省理工学院许可证
- 文档:http://echarts-python.readthedocs.io/en/stable/(未准备好)
- 在线演示:https://yufeiminds.github.io/echarts-python/(未准备好)
此回购协议仍在开发中(ALPHA),不要在生产中使用
基本用法
fromechartsimportEchart,Legend,Bar,Axischart=Echart('GDP','This is a fake chart')chart.use(Bar('China',[2,3,4,5]))chart.use(Legend(['GDP']))chart.use(Axis('category','bottom',data=['Nov','Dec','Jan','Feb']))
chart.json属性将是
{"title":{"text":"GDP","subtext":"This is a fake chart"},"series":[{"type":"bar","data":[2,3,4,5],"name":"China"}],"legend":{"y":"top","x":"center","data":["GDP"],"orient":"horizontal"},"xAxis":[{"position":"bottom","data":["Nov","Dec","Jan","Feb"],"type":"category"}],"yAxis":{}}
在Mac OSX上,您还可以执行
chart.plot()
并调用浏览器来显示图表。