Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/peng-yin/react-hooks-echarts
React hooks for ECharts.
https://github.com/peng-yin/react-hooks-echarts
Last synced: 19 days 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 (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-22T09:43:30.000Z (about 3 years ago)
- Last Synced: 2024-11-08T05:46:50.195Z (about 2 months ago)
- Language: TypeScript
- Size: 61.5 KB
- Stars: 5
- Watchers: 2
- 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.![](https://img.shields.io/npm/v/react-hooks-echarts)
![](https://img.shields.io/github/license/peng-yin/react-hooks-echarts)
![](https://img.shields.io/npm/types/react-hooks-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
[![Edit flooks](https://codesandbox.io/static/img/play-codesandbox.svg)](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)