import { AreaProps, AreaChart as ReChartsAreaChart } from 'recharts'; import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core'; import { ChartLegendStylesNames } from '../ChartLegend'; import { ChartTooltipStylesNames } from '../ChartTooltip'; import type { BaseChartStylesNames, ChartSeries, GridChartBaseProps, MantineChartDotProps } from '../types'; export interface AreaChartSeries extends ChartSeries { strokeDasharray?: string | number; color: MantineColor; curveType?: AreaChartCurveType; } export type AreaChartType = 'default' | 'stacked' | 'percent' | 'split'; export type AreaChartCurveType = 'bump' | 'linear' | 'natural' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter'; export type AreaChartStylesNames = 'area' | BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames; export type AreaChartCSSVariables = { root: '--chart-text-color' | '--chart-grid-color'; }; export interface AreaChartProps extends BoxProps, GridChartBaseProps, StylesApiProps, ElementProps<'div'> { /** An array of objects with `name` and `color` keys. Determines which data should be consumed from the `data` array. */ series: AreaChartSeries[]; /** Controls how chart areas are positioned relative to each other @default `'default'` */ type?: AreaChartType; /** Determines whether the chart area should be represented with a gradient instead of the solid color @default `false` */ withGradient?: boolean; /** Type of the curve @default `'monotone'` */ curveType?: AreaChartCurveType; /** 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 areas @default `2` */ strokeWidth?: number; /** Props passed down to recharts `AreaChart` component */ areaChartProps?: React.ComponentPropsWithoutRef; /** Controls fill opacity of all areas @default `0.2` */ fillOpacity?: number; /** A tuple of colors used when `type="split"` is set, ignored in all other cases. A tuple may include theme colors reference or any valid CSS colors @default `['green.7', 'red.7']` */ splitColors?: [MantineColor, MantineColor]; /** Offset for the split gradient. By default, value is inferred from `data` and `series` if possible. Must be generated from the data array with `getSplitOffset` function. */ splitOffset?: number; /** If set, points with `null` values are connected @default `true` */ connectNulls?: boolean; /** Additional components that are rendered inside recharts `AreaChart` component */ children?: React.ReactNode; /** Props passed down to recharts `Area` component */ areaProps?: ((series: AreaChartSeries) => Partial>) | Partial>; /** If set, each point has an associated label @default `false` */ withPointLabels?: boolean; } export type AreaChartFactory = Factory<{ props: AreaChartProps; ref: HTMLDivElement; stylesNames: AreaChartStylesNames; vars: AreaChartCSSVariables; }>; export declare const AreaChart: import("@mantine/core").MantineComponent<{ props: AreaChartProps; ref: HTMLDivElement; stylesNames: AreaChartStylesNames; vars: AreaChartCSSVariables; }>;