ECharts for React is a React component around Apache ECharts with opts passthrough, resize handling, event binding, and tree-shakable ECharts module imports.
Overview
ECharts for React exposes ReactECharts as the primary bridge to Apache ECharts charting. You pass a standard ECharts option object and optional opts that flow into echarts.init, controlling renderer, locale, sizing, and performance flags such as useDirtyRect.
The component supports onEvents callbacks with the ECharts event object, autoResize on window changes, and getEchartsInstance() for imperative APIs like exporting images or toggling series. Documentation covers manual ECharts module imports to shrink bundles for v5 and v6.
Next.js users transpile echarts and zrender packages in next.config. Optional echarts-gl imports enable GL series when required. The project positions itself as a minimal, widely downloaded React binding for ECharts.
Developers use it wherever React apps need line, bar, scatter, or other ECharts visualizations without reimplementing lifecycle and resize wiring.
Key features
- ReactECharts option-driven component
- Configurable init opts
- Window resize auto handling
- ECharts event hook bindings
- Imperative instance accessor
- Canvas or SVG renderer choice
- Next.js transpile guidance
- Modular ECharts imports
Use cases
- Embed charts in React dashboards
- Bind drill-down chart events
- Export chart images from React
- Reduce bundle size via partial imports