
pyecharts
A Python library for making interactive ECharts charts from Python code.
- Stars
- 15.8k
- Forks
- 2.8k
- Licence
- MIT
- Language
- Python
- Last update
- 11 days ago
- Type
- Library
What it is
pyecharts lets you build interactive charts with Python instead of writing JavaScript. It wraps Apache ECharts, a charting library, and produces HTML charts that can be viewed in a browser, shown in Jupyter notebooks, or embedded in web frameworks like Flask and Django. The README describes it as offering 30+ chart types and support for map data.
- Render a bar chart comparing sales figures to an HTML file with bar.render()
- Show a chart inline in a Jupyter notebook
- Save a chart as a PNG image using make_snapshot with snapshot-selenium or snapshot-phantomjs
- Embed a chart in a Flask or Django web page
Great for
- Python users who analyze data and want interactive charts
- Jupyter or marimo notebook users who want charts inline
- Developers adding charts to Flask, Sanic, or Django web apps
- People who want to make maps using the bundled map files
Not ideal for
- Users who need the newest ECharts features only available in JavaScript, since the README does not detail feature parity
- People who need a non-Python frontend stack and do not want a Python dependency
- Users wanting the older 0.5.x line, which the README says is no longer maintained
How to get it
- 1
Install with a package manager
You'll need: Python 3.7+
Install or upgrade via pip
pip install pyecharts -U - 2
Run it
- Install with pip install pyecharts -U
- Create a Bar() chart and add x-axis labels and y-axis values
- Call bar.render() to write an HTML file
- Open the generated HTML file in a browser
- 3
Get the most out of it
- Use method chaining (for example .add_xaxis().add_yaxis()) to keep chart code short
- Set titles and options with set_global_opts and opts classes
- Use make_snapshot to export PNG images if you install snapshot-selenium or snapshot-phantomjs
- Browse the pyecharts gallery for working examples of the 30+ chart types
Downloads
Strengths
- Chainable API lets you build charts in a few readable lines of Python
- Wraps the established Apache ECharts library
- Documentation and gallery examples are provided per the README
Trade-offs
- README is partly in Chinese and the English version is a separate file, which may slow non-Chinese readers
- Saving PNG images needs an extra tool (snapshot-selenium or snapshot-phantomjs) that the README says must be installed separately
- Version history is split across 0.5.x, V1, and V2, so the correct docs depend on which version you use
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| pyecharts (this) | 15.8k | Library | beginner | 11 days ago | Python users who analyze data and want interactive charts |
| vue-echarts | 10.7k | Library | intermediate | 9 days ago | Vue developers who want to add interactive charts to a Vue 3 app |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.