UNPKG

@visx/xychart

Version:

Composable cartesian coordinate chart built with visx primitives

14 lines 999 B
import { ReactNode } from 'react'; import { StackPathConfig } from '@visx/shape'; import { AxisScale } from '@visx/axis'; import { CombinedStackData, SeriesProps } from '../types'; declare type UseStackedData<Datum extends object> = { children: ReactNode; } & Pick<StackPathConfig<Datum, string>, 'offset' | 'order'>; export default function useStackedData<XScale extends AxisScale, YScale extends AxisScale, Datum extends object, ChildrenProps extends SeriesProps<XScale, YScale, Datum>>({ children, order, offset }: UseStackedData<Datum>): { seriesChildren: import("react").ReactElement<ChildrenProps, string | ((props: any) => import("react").ReactElement<any, string | any | (new (props: any) => import("react").Component<any, any, any>)> | null) | (new (props: any) => import("react").Component<any, any, any>)>[]; dataKeys: string[]; stackedData: import("d3-shape").Series<CombinedStackData<XScale, YScale>, string>[]; }; export {}; //# sourceMappingURL=useStackedData.d.ts.map