Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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)