import { InheritedColorProp } from '@orbit-nivo/colors'; import { CompletePieSvgProps, ComputedDatum, PieArcGenerator, LabelAccessorFunction, PieCustomLayerProps, RadialLabelData, SliceLabelData } from './types'; interface MayHaveLabel { label?: string | number; } /** * Format data so that we get a consistent data structure. * It will also add the `formattedValue` and `color` property. */ export declare const useNormalizedData: ({ data, id, value, valueFormat, colors, }: Pick, "id" | "value" | "valueFormat" | "colors"> & { data: RawDatum[]; }) => Pick, "color" | "id" | "label" | "value" | "formattedValue" | "data">[]; /** * Compute arcs, which don't depend yet on radius. */ export declare const usePieArcs: ({ data, startAngle, endAngle, padAngle, sortByValue, }: { data: Pick, "color" | "id" | "label" | "value" | "formattedValue" | "data">[]; startAngle: number; endAngle: number; padAngle: number; sortByValue: boolean; }) => Pick, "color" | "id" | "label" | "value" | "formattedValue" | "data" | "arc">[]; export declare const usePieArcGenerator: ({ radius, innerRadius, cornerRadius, }: { radius: number; innerRadius: number; cornerRadius: number; }) => PieArcGenerator; /** * Compute pie layout using explicit radius/innerRadius, * expressed in pixels. */ export declare const usePie: ({ data, radius, innerRadius, startAngle, endAngle, padAngle, sortByValue, cornerRadius, }: Pick, "sortByValue" | "padAngle" | "cornerRadius" | "startAngle" | "endAngle"> & { data: Pick, "color" | "fill" | "id" | "label" | "value" | "formattedValue" | "data">[]; radius: number; innerRadius: number; }) => { dataWithArc: Pick, "color" | "id" | "label" | "value" | "formattedValue" | "data" | "arc">[]; arcGenerator: PieArcGenerator; }; /** * Compute pie layout using a box to find radius/innerRadius, * expressed in ratio (0~1), can optionally use the `fit` * attribute to find the most space efficient layout. * * It also returns `centerX`/`centerY` as those can be altered * if `fit` is `true`. */ export declare const usePieFromBox: ({ data, width, height, innerRadius: innerRadiusRatio, startAngle, endAngle, padAngle, sortByValue, cornerRadius, fit, }: Pick, "height" | "width" | "sortByValue" | "innerRadius" | "padAngle" | "cornerRadius" | "startAngle" | "endAngle" | "fit"> & { data: Pick, "color" | "fill" | "id" | "label" | "value" | "formattedValue" | "data">[]; }) => { centerX: number; centerY: number; radius: number; innerRadius: number; debug: { box: any; ratio: number; points: any; } | undefined; dataWithArc: Pick, "color" | "id" | "label" | "value" | "formattedValue" | "data" | "arc">[]; arcGenerator: PieArcGenerator; }; export declare const usePieSliceLabels: ({ enable, dataWithArc, skipAngle, radius, innerRadius, radiusOffset, label, textColor, }: { enable: boolean; dataWithArc: ComputedDatum[]; skipAngle: number; radius: number; innerRadius: number; radiusOffset: number; label: string | LabelAccessorFunction; textColor: InheritedColorProp>; }) => SliceLabelData[]; export declare const usePieRadialLabels: ({ enable, dataWithArc, label, textXOffset, textColor, radius, skipAngle, linkOffset, linkDiagonalLength, linkHorizontalLength, linkColor, }: { enable: boolean; dataWithArc: ComputedDatum[]; label: string | LabelAccessorFunction; textXOffset: number; textColor: InheritedColorProp>; radius: number; skipAngle: number; linkOffset: number; linkDiagonalLength: number; linkHorizontalLength: number; linkColor: InheritedColorProp>; }) => RadialLabelData[]; /** * Memoize the context to pass to custom layers. */ export declare const usePieLayerContext: ({ dataWithArc, arcGenerator, centerX, centerY, radius, innerRadius, }: { dataWithArc: ComputedDatum[]; arcGenerator: PieArcGenerator; centerX: number; centerY: number; radius: number; innerRadius: number; }) => PieCustomLayerProps; export {}; //# sourceMappingURL=hooks.d.ts.map