Description
echarts-for-react is a React wrapper for Apache ECharts, the charting library, so you can draw ECharts charts as React components. The project describes itself as the simplest and best React wrapper for ECharts. You install the package, import the component and pass it an option object that describes the chart. The component gives you access to the underlying ECharts instance through a ref, so you can call any ECharts API, for example to export the chart as a base64 image or to resize it. Event handlers such as a click on the chart or a change in the legend selection can be passed as an object of handlers. The README explains how to import only the ECharts modules you need to reduce the bundle size, with separate notes for ECharts v5 and v6 and for v3 and v4. For Next.js, it describes adding echarts and zrender to transpilePackages in the Next.js config for versions 13.1 and newer. It also shows how to add the echarts-gl package for 3D charts. The project includes a demo site, and the README says the library works with the MCP server mcp-server-chart for visualization. It is licensed under the MIT License and is written for React developers who want ECharts without managing the chart lifecycle by hand.…
Highlights
- Renders ECharts charts as a React component
- Access to the ECharts instance through a ref
- Event handlers for chart clicks and legend changes
- Modular imports to reduce the bundle size
- Next.js setup notes and echarts-gl support for 3D
Ratings & Reviews
No ratings yet
Be the first to rate echarts for react.
People also visit
echarts for react FAQ
What is echarts-for-react?
A React wrapper for Apache ECharts that lets you render ECharts charts as React components.
Can I use every ECharts feature?
Yes. A ref gives access to the ECharts instance, so you can call any ECharts API, such as exporting an image.
How do I reduce bundle size?
Import only the ECharts modules you need, following the README for ECharts v5 and v6 or for v3 and v4.
Does it work with Next.js?
Yes, but for Next.js 13.1 and newer add echarts and zrender to transpilePackages in the Next.js config.
What license is it under?
The MIT License, according to the README.
What are the best echarts for react alternatives?
Popular alternatives to echarts for react include react-apexcharts, react-chartjs and vue-echarts. See all echarts for react alternatives



















