Skip to content

peng-yin/react-hooks-echarts

Repository files navigation

react-hooks-echarts v1

React hooks for ECharts.

Install

yarn add react-hooks-echarts

# npm install react-hooks-echarts

Usage

import useEcharts from 'react-hooks-echarts';

const H = () => {
  const [chartRef, ref] = useEcharts()

  useEffect(() => {
    const chart = chartRef.current
    chart?.setOption({})
  }, [])

  return (
    <div ref={ref} className="chart" style={{ height: 800 }}></div>
  )
}

Demo

Edit flooks

License

MIT License

About

React hooks for ECharts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published