hustcc/echarts-for-react is one of the UI-focused repositories TopGit tracks, currently at 5.0k stars, written primarily in TypeScript. ⛳️ Apache ECharts components for React wrapper. 一个简单的 Apache echarts 的 React 封装。
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
The simplest, and the best React wrapper for Apache ECharts. Using visualization with MCP Server mcp-server-chart.
Install
$ npm install --save echarts-for-react
# `echarts` is the peerDependence of `echarts-for-react`, you can install echarts with your own version.
$ npm install --save echarts
For Next.js user, code transpilation is needed. For Next.js 13.1 or higher, as all next-transpile-modules features are natively built-in and the package has been deprecated, so please add transpilePackages: ['echarts', 'zrender'] into nextConfig object:
the echarts option config, can see https://echarts.apache.org/option.html#title.
notMerge (optional, object)
when setOption, not merge the data, default is false. See https://echarts.apache.org/api.html#echartsInstance.setOption.
replaceMerge (optional, string | string[])
when setOption, default is null. See https://echarts.apache.org/api.html#echartsInstance.setOption.
lazyUpdate (optional, object)
when setOption, lazy update the data, default is false. See https://echarts.apache.org/api.html#echartsInstance.setOption.
style (optional, object)
the style of echarts div. object, default is {height: '300px'}.
className (optional, string)
the class of echarts div. you can setting the css style of charts by class name.
theme (optional, string)
the theme of echarts. string, should registerTheme before use it (theme object format: https://github.com/ecomfe/echarts/blob/master/theme/dark.js). e.g.
for more event key name, see: https://echarts.apache.org/api.html#events
opts (optional, object)
the opts of echarts. object, will be used when initial echarts instance by echarts.init. Document here.
<ReactECharts
option={this.getOption()}
style={{ height: '300px' }}
opts={{renderer: 'svg'}} // use svg to render the chart.
/>
autoResize (optional, boolean)
decide whether to trigger this.resize when window resize. default is true.
Component API & Echarts API
the Component only has one API named getEchartsInstance.
getEchartsInstance() : get the echarts instance object, then you can use any API of echarts.
for example:
// render the echarts component below with rel
<ReactECharts
ref={(e) => { this.echartRef = e; }}
option={this.getOption()}
/>
// then get the `ReactECharts` use this.echarts_react
const echartInstance = this.echartRef.getEchartsInstance();
// then you can use any API of echarts.
const base64 = echartInstance.getDataURL();
How active is development on hustcc/echarts-for-react?
The most recent commit recorded on hustcc/echarts-for-react was 10 months ago, based on the GitHub push timestamp. The repository has 648 forks — one of the better signals of community interest.
Is hustcc/echarts-for-react open source?
Yes — hustcc/echarts-for-react ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/hustcc/echarts-for-react.
What license does hustcc/echarts-for-react use?
hustcc/echarts-for-react is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is hustcc/echarts-for-react associated with?
GitHub's repository topics for hustcc/echarts-for-react: "echarts", "echarts-for-react", "javascript", "react", "react-component", "visualization". TopGit's editorial category is Frontend.
Where can I see hustcc/echarts-for-react in action?
The project maintains a homepage at https://git.hust.cc/echarts-for-react. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about hustcc/echarts-for-react?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/hustcc/echarts-for-react is the definitive source.
Read full README in the tab above.
Still deciding about echarts-for-react?
One click hands the question to an AI along with this page — see what it says about echarts-for-react.