import { ComposedChart as ReChartsComposedChart } from 'recharts'; import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core'; import { ChartTooltipStylesNames } from '../ChartTooltip'; import type { BaseChartStylesNames, GridChartBaseProps } from '../types'; export interface CandlestickChartDataKeys { /** Key of the data object for the open value */ open: string; /** Key of the data object for the high value */ high: string; /** Key of the data object for the low value */ low: string; /** Key of the data object for the close value */ close: string; } export interface CandlestickChartLabels { /** Label of the open value displayed in the tooltip */ open: string; /** Label of the high value displayed in the tooltip */ high: string; /** Label of the low value displayed in the tooltip */ low: string; /** Label of the close value displayed in the tooltip */ close: string; } export type CandlestickChartStylesNames = 'candle' | Exclude | ChartTooltipStylesNames; export type CandlestickChartCssVariables = { root: '--chart-text-color' | '--chart-grid-color'; }; export interface CandlestickChartProps extends BoxProps, Pick, StylesApiProps, ElementProps<'div'> { /** Data used to display chart */ data: Record[]; /** Keys of the `data` object used to read open, high, low and close values @default `{ open: 'open', high: 'high', low: 'low', close: 'close' }` */ dataKeys?: CandlestickChartDataKeys; /** Labels of open, high, low and close values displayed in the tooltip @default `{ open: 'Open', high: 'High', low: 'Low', close: 'Close' }` */ labels?: Partial; /** Color of candles with `close >= open`, key of `theme.colors` or any valid CSS color @default 'teal.6' */ upColor?: MantineColor; /** Color of candles with `close < open`, key of `theme.colors` or any valid CSS color @default 'red.6' */ downColor?: MantineColor; /** Maximum candle width in px */ maxCandleWidth?: number; /** Stroke width of the candle wick and body outline @default 1 */ candleStrokeWidth?: number; /** Props passed down to recharts `ComposedChart` component */ composedChartProps?: React.ComponentProps; /** Additional components that are rendered inside recharts `ComposedChart` component */ children?: React.ReactNode; } export type CandlestickChartFactory = Factory<{ props: CandlestickChartProps; ref: HTMLDivElement; stylesNames: CandlestickChartStylesNames; vars: CandlestickChartCssVariables; }>; export declare const CandlestickChart: import("@mantine/core").MantineComponent<{ props: CandlestickChartProps; ref: HTMLDivElement; stylesNames: CandlestickChartStylesNames; vars: CandlestickChartCssVariables; }>; export declare namespace CandlestickChart { type Props = CandlestickChartProps; type CssVariables = CandlestickChartCssVariables; type Factory = CandlestickChartFactory; type Labels = CandlestickChartLabels; type DataKeys = CandlestickChartDataKeys; type StylesNames = CandlestickChartStylesNames; }