0.3.0 • Published 3 years ago

@ailjc/react-hooks-echarts v0.3.0

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

@ailjc/react-hooks-echarts

React hooks for ECharts.

npm.io npm.io

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;