@ailjc/react-hooks-echarts
v0.3.0
Published
React hooks for ECharts.
Downloads
12
Readme
@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;