@ailjc/react-hooks-echarts
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

@ailjc/react-hooks-echarts

React hooks for ECharts.

Install

yarn add @ailjc/react-hooks-echarts

Usage

import useEcharts from '@ailjc/react-hooks-echarts';

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

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

  return (
    <div
      ref={ref}
      style={{
        height: '600px',
        width: '800px',
      }}
    ></div>
  );
};

export default App;

Readme

Keywords

Package Sidebar

Install

npm i @ailjc/react-hooks-echarts

Weekly Downloads

3

Version

0.3.0

License

MIT

Unpacked Size

5.43 kB

Total Files

6

Last publish

Collaborators

  • lujingce