import { AreaProps, BarProps, LineProps, ComposedChart as ReChartsCompositeChart } from 'recharts'; import { BoxProps, ElementProps, Factory, StylesApiProps } from '@mantine/core'; import { ChartLegendStylesNames } from '../ChartLegend'; import { ChartTooltipStylesNames } from '../ChartTooltip'; import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps, MantineChartDotProps } from '../types'; export type CompositeChartCurveType = 'bump' | 'linear' | 'natural' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter'; export interface CompositeChartSeries extends ChartSeries { type: 'line' | 'area' | 'bar'; strokeDasharray?: string | number; } export type CompositeChartStylesNames = 'line' | 'area' | 'bar' | BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames; export type CompositeChartCssVariables = { root: '--chart-text-color' | '--chart-grid-color'; }; export interface CompositeChartProps extends BoxProps, Omit, StylesApiProps, ElementProps<'div'> { /** Data used to display chart */ data: Record[]; /** An array of objects with `name` and `color` keys. Determines which data should be consumed from the `data` array. */ series: CompositeChartSeries[]; /** Type of the curve @default `'monotone'` */ curveType?: CompositeChartCurveType; /** Determines whether dots should be displayed @default `true` */ withDots?: boolean; /** Props passed down to all dots. Ignored if `withDots={false}` is set. */ dotProps?: MantineChartDotProps; /** Props passed down to all active dots. Ignored if `withDots={false}` is set. */ activeDotProps?: MantineChartDotProps; /** Stroke width for the chart lines @default `2` */ strokeWidth?: number; /** Determines whether points with `null` values should be connected @default `true` */ connectNulls?: boolean; /** Additional components that are rendered inside recharts `AreaChart` component */ children?: React.ReactNode; /** Props passed down to recharts `Line` component */ lineProps?: ((series: CompositeChartSeries) => Partial>) | Partial>; /** Props passed down to recharts `Area` component */ areaProps?: ((series: CompositeChartSeries) => Partial>) | Partial>; /** Props passed down to recharts `Bar` component */ barProps?: ((series: CompositeChartSeries) => Partial>) | Partial>; /** Determines whether each point should have associated label @default `false` */ withPointLabels?: boolean; /** Determines whether a label with bar value should be displayed on top of each bar @default `false` */ withBarValueLabel?: boolean; /** Sets minimum height of the bar in px @default `0` */ minBarSize?: number; /** Maximum bar width in px */ maxBarWidth?: number; /** Props passed down to recharts `AreaChart` component */ composedChartProps?: React.ComponentPropsWithoutRef; } export type CompositeChartFactory = Factory<{ props: CompositeChartProps; ref: HTMLDivElement; stylesNames: CompositeChartStylesNames; vars: CompositeChartCssVariables; }>; export declare const CompositeChart: import("@mantine/core").MantineComponent<{ props: CompositeChartProps; ref: HTMLDivElement; stylesNames: CompositeChartStylesNames; vars: CompositeChartCssVariables; }>;