import { ReactElement } from 'react'; import { NumericKey } from '../../cards/keys'; import { ObservationsCardProps, ObservationScene } from '../../cards/observations-card'; export interface VolumeProfileCardProps> extends Omit, 'color' | 'aggregate' | 'legend' | 'legendSwatch'> { /** Field holding each period's close. */ close: Key; /** Field holding each period's traded volume. */ volume: NumericKey; /** Open, so each period's volume counts as bought (close at or above open) or sold. */ open?: NumericKey; /** High and low spread a period's volume over the prices it traded; otherwise it sits at close. */ high?: NumericKey; low?: NumericKey; /** How many price bands to split the range into. Defaults to 24. */ bins?: number; /** Share of volume the value area holds around the busiest price. Defaults to 0.7. */ valueArea?: number; /** Volume format. Defaults to compact numbers. */ volumeFormat?: Intl.NumberFormatOptions; } export interface VolumeBin { low: number; high: number; bought: number; sold: number; } export interface VolumeProfile { bins: VolumeBin[]; /** The busiest band: the point of control. */ poc: number; /** First and last band of the value area, inclusive. */ area: readonly [number, number]; total: number; last: number | null; } /** * Volume at each price. A period's volume is spread evenly over the prices between its low and * high, and counts as bought when it closed at or above its open (or the previous close). */ export declare function volumeProfile(data: readonly Row[], keys: { close: string; volume: string; open?: string; high?: string; low?: string; }, count: number, share: number): VolumeProfile | { error: string; } | null; export declare function volumeProfileLayout(data: readonly Row[], keys: { close: string; volume: string; open?: string; high?: string; low?: string; }, count: number, share: number, width: number, height: number, price: (value: number) => string, size: (value: number) => string): ObservationScene; /** * Where a market traded: volume at each price as horizontal bars split into bought and sold, * the busiest price (point of control) marked, and the value area that holds most of the volume * shaded. The headline is the point of control; hover reads each band's volume. */ export declare function VolumeProfileCard>({ close, volume, open, high, low, bins, valueArea, volumeFormat, locale, valueFormat, formatValue, ...props }: VolumeProfileCardProps): ReactElement;