hustcc/echarts-for-react hiện có 5.0k sao trên GitHub, viết chủ yếu bằng TypeScript. ⛳️ Apache ECharts components for React wrapper. 一个简单的 Apache echarts 的 React 封装。
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
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();
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/hustcc/echarts-for-react là nguồn chính thức.
hustcc/echarts-for-react có những chủ đề gì?
GitHub topics của hustcc/echarts-for-react: "echarts", "echarts-for-react", "javascript", "react", "react-component", "visualization". TopGit xếp repo vào nhóm Frontend.
hustcc/echarts-for-react có phải mã nguồn mở không?
Có — hustcc/echarts-for-react phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/hustcc/echarts-for-react.
hustcc/echarts-for-react có trang demo không?
Dự án có trang chủ ở https://git.hust.cc/echarts-for-react. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
hustcc/echarts-for-react còn đang phát triển không?
Commit gần nhất trên hustcc/echarts-for-react là 10 tháng trước (theo timestamp GitHub). Repo có 648 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
hustcc/echarts-for-react dùng license gì?
hustcc/echarts-for-react phát hành theo license MIT. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về echarts-for-react?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về echarts-for-react.