import { ComponentProps } from 'react'; import { Rectangle } from 'recharts'; /** * Represents the three bar types in the trajectory chart: * - withoutActionPlan: Shows the projected score without any action plan * - score: Shows the current/initial score * - withActionPlan: Shows the projected score with the action plan applied */ export type BarType = "withoutActionPlan" | "score" | "withActionPlan"; /** * Data structure for each data point in the trajectory chart */ export type TransformedDatum = { name: string; goal?: number | null; initial?: number | null; withoutActionPlan?: number | null; withActionPlan?: number | null; withoutActionPlanColor?: string; withActionPlanColor?: string; }; /** * Flags indicating which bar types are present for a given data point */ export type BarPresenceFlags = { hasWithoutActionPlan: boolean; hasScore: boolean; hasWithActionPlan: boolean; }; /** * Props for the Rectangle shape component used in bar rendering */ export type RectangleShapeProps = ComponentProps & { payload: TransformedDatum; }; /** * Determines which bar types are present in the given data point. * A bar is considered present if its value is not null or undefined. */ export declare const getBarPresenceFlags: (payload: TransformedDatum) => BarPresenceFlags; /** * Computes the position and width for a bar in the trajectory chart. * * The chart displays up to 3 bars per data point: * - withoutActionPlan: leftmost position * - score: center position * - withActionPlan: rightmost position * * The layout algorithm adapts based on how many bars are present: * - 1 bar: Takes full width with margins * - 2 bars: Split the available space equally * - 3 bars: Each gets 1/3 of the space * */ export declare const computeRect: (barType: BarType, x: number, width: number, flags: BarPresenceFlags, marginFactor?: number) => { x: number; width: number; };