UNPKG

recharts

Version:
36 lines (35 loc) • 1.8 kB
import { ReactElement } from 'react'; import { FunnelTrapezoidItem } from '../../cartesian/Funnel'; import { LegendPayload } from '../../component/DefaultLegendContent'; import { LegendType, DataKey, TooltipType } from '../../util/types'; import { ChartData } from '../chartDataSlice'; import { RechartsRootState } from '../store'; import { GraphicalItemId } from '../graphicalItemsSlice'; import { UnthemedColors } from '../../theme/dataEntryStyles'; export type ResolvedFunnelSettings = { dataKey: DataKey<any>; data: ChartData | undefined; nameKey: DataKey<any>; tooltipType?: TooltipType; lastShapeType?: 'triangle' | 'rectangle'; reversed?: boolean; customWidth?: string | number; cells: ReadonlyArray<ReactElement>; presentationProps: Record<string, any> | null; /** * Per-index theme styles for the funnel items. Each item at index `i` gets the style at * `i % indexedStyles.length`. Only values not explicitly provided via props are set, * so an explicit prop still wins over the theme. */ indexedStyles: ReadonlyArray<Record<string, any>>; /** * Explicit `fill` and `stroke` props without theme contributions. Items that define their own colors * (in data or in Cell) get these over `indexedStyles`, so they drop the theme colors and keep the other theme styles. * Undefined when there is no active theme. */ unthemedColors?: UnthemedColors; legendType?: LegendType; id: GraphicalItemId; }; export declare const selectFunnelTrapezoids: (state: RechartsRootState, funnelSettings: ResolvedFunnelSettings) => ReadonlyArray<FunnelTrapezoidItem>; export declare const selectFunnelLegend: (state: RechartsRootState, funnelSettings: ResolvedFunnelSettings) => ReadonlyArray<LegendPayload> | undefined;