import { ReactElement } from 'react'; import { NumericKey, XKey } from '../../cards/keys'; import { ObservationsCardProps, ObservationScene } from '../../cards/observations-card'; export interface MonthlyReturnsCardProps> extends Omit, 'color' | 'aggregate'> { /** Date of each row: a Date, an ISO date string, or a timestamp. Months are read in UTC. */ x: XKey; /** Price or level at that date. Each month returns its last close over the month before. */ price: Key; /** Add each year's compounded return as a last column. Defaults to true. */ total?: boolean; /** The monthly return at which tiles reach full color. Defaults to 0.08, an 8% month. */ scale?: number; } interface MonthReturn { year: number; month: number; value: number | null; /** The month had no rows, so its return could not be read. */ missing: boolean; } /** Each month's return from the last close of the month before; the first month from its open. */ export declare function monthlyReturns(data: readonly Row[], x: string, price: string): MonthReturn[] | { error: string; }; export declare function monthlyReturnsLayout(data: readonly Row[], x: string, price: string, total: boolean, scale: number, width: number, height: number, percent: (value: number) => string): ObservationScene; /** * Monthly returns as a factsheet grid: one row per year, newest first, a tile per month colored * green or red by how far it moved, and each year's compounded return at the end. */ export declare function MonthlyReturnsCard>({ x, price, total, scale, legend, locale, valueFormat, formatValue, ...props }: MonthlyReturnsCardProps): ReactElement; export {};