1.0.0 • Published 3 years ago

react-hooks-echarts v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

npm.io npm.io npm.io npm.io

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