An unofficial Echarts options generator with Python.
Travis CI Status Doc StatusThis repo still on developing (ALPHA), DON'T USE IT IN PRODUCTION.
Installing echarts-python with pip
$ pip install echarts-python
Current version for Basic Usage
from echarts import Echart, Legend, Bar, Axis
chart = 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']))
The chart.json property will be
{
"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": {}
}
on Mac OSX, you also can execute
chart.plot()
and invoke a browser to display the chart.
This package authored by Hsiaoming Yang <me@lepture.com> in 2014.
If you have any question or want to improve this repository, welcome to create an pull requests .
This repo is maintained by Yufei Li <yufeiminds@gmail.com> now, you can also send a email to me.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。