https://github.com/peng-yin/react-hooks-echarts
React hooks for ECharts.
https://github.com/peng-yin/react-hooks-echarts
Last synced: 3 months ago
JSON representation
React hooks for ECharts.
- Host: GitHub
- URL: https://github.com/peng-yin/react-hooks-echarts
- Owner: peng-yin
- License: mit
- Created: 2021-10-22T02:54:54.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-22T09:43:30.000Z (over 3 years ago)
- Last Synced: 2025-03-18T13:08:23.483Z (4 months ago)
- Language: TypeScript
- Size: 61.5 KB
- Stars: 5
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
react-hooks-echarts v1
React hooks for ECharts.

## Install
```sh
yarn add react-hooks-echarts# npm install react-hooks-echarts
```## Usage
```jsx
import useEcharts from 'react-hooks-echarts';const H = () => {
const [chartRef, ref] = useEcharts()useEffect(() => {
const chart = chartRef.current
chart?.setOption({})
}, [])return (
)
}
```## Demo
[](https://codesandbox.io/s/quiet-tdd-ff8ge?fontsize=14&hidenavigation=1&theme=dark)
## License
[MIT License](https://github.com/peng-yin/react-hooks-echarts/blob/main/LICENSE)