useChartGroup.tsx 246 B

12345678
  1. import {useLayoutEffect} from 'react';
  2. import * as echarts from 'echarts/core';
  3. export function useChartGroup(groupName: string, deps?: React.DependencyList) {
  4. useLayoutEffect(() => {
  5. echarts.connect(groupName);
  6. }, [groupName, deps]);
  7. }