import { type SyntheticEvent, type MutableRefObject } from 'react'; import type { ECharts } from 'echarts'; import { type ResizeCallbackData } from 'react-resizable'; import { type ChartOptions } from '../../components/chart/types'; export declare const calculateAdjustedWidth: (width: number, staticWidth: number, unit: string, value: number) => number; export declare const getChartWidth: (width: number, staticWidth: number, isLegendVisible?: boolean, legendWidth?: string, isBottomAligned?: boolean) => number; export declare const calculateAdjustedHight: (height: number, unit: string, value: number) => number; export declare const getChartHeight: (height: number, isLegendVisible?: boolean, legendHeight?: string, isBottomAligned?: boolean) => number; export declare const getRightLegendWidth: (isLegendVisible: boolean, isBottomAligned: boolean, width: number, leftLegendWidth: number, chartWidth: number) => number; export declare const getRightLegendHeight: (isLegendVisible: boolean, isBottomAligned: boolean, height: number, chartHeight: number) => number; export declare const getLegendHeight: (height: number, chartHeight: number, unitType: string) => string; export declare const getLegendWidth: (width: number, chartWidth: number, leftLegendWidth: number, unitType: string) => string; /** * hook to set up the size of an echarts instance within the base chart component * note: the chart sits along side a legend table which means that the * echart is actually smaller in width than the overall base chart component * * @param chartRef React ref to an initialized echarts object * @param size size of the chart * @returns * - width: width of the component * - height: height of the component * - chartWidth: width of the chart minus the left legend * - onResize: handler to react to resizing the chart size * - minConstraints: min size of the chart within the component * - maxConstraints: max size of the chart within the component */ export declare const useResizeableEChart: (chartRef: MutableRefObject, size: { width: number; height: number; }, legend: ChartOptions["legend"], isBottomAligned: boolean, onChartOptionsChange?: (options: Pick) => void) => { chartWidth: number; chartHeight: number; leftLegendWidth: number; rightLegendWidth: number; rightLegendHeight: number; onResize: (_event: SyntheticEvent, data: ResizeCallbackData) => void; onResizeEnd: (_event: SyntheticEvent, data: ResizeCallbackData) => void; minConstraints: [number, number]; maxConstraints: [number, number]; leftLegendRef: import("react-use/lib/useMeasure").UseMeasureRef; }; //# sourceMappingURL=useResizeableEChart.d.ts.map