import { LineProps, LineChart as ReChartsLineChart } 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 type LineChartType = 'default' | 'gradient'; export interface LineChartGradientStop { offset: number; color: MantineColor; } export type LineChartCurveType = 'bump' | 'linear' | 'natural' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter'; export interface LineChartSeries extends ChartSeries { strokeDasharray?: string | number; curveType?: LineChartCurveType; } export type LineChartStylesNames = 'line' | BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames; export type LineChartCssVariables = { root: '--chart-text-color' | '--chart-grid-color'; }; export interface LineChartProps extends BoxProps, GridChartBaseProps, 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: LineChartSeries[]; /** Controls styles of the line @default `'default'` */ type?: LineChartType; /** Data used to generate gradient stops @default `[{ offset: 0, color: 'red' }, { offset: 100, color: 'blue' }]` */ gradientStops?: LineChartGradientStop[]; /** Type of the curve @default `'monotone'` */ curveType?: LineChartCurveType; /** Controls fill opacity of all lines @default `1` */ fillOpacity?: number; /** 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; /** Props passed down to recharts `LineChart` component */ lineChartProps?: React.ComponentPropsWithoutRef; /** Determines whether points with `null` values should be connected @default `true` */ connectNulls?: boolean; /** Additional components that are rendered inside recharts `LineChart` component */ children?: React.ReactNode; /** Props passed down to recharts `Line` component */ lineProps?: ((series: LineChartSeries) => Partial>) | Partial>; /** Determines whether each point should have associated label @default `false` */ withPointLabels?: boolean; } export type LineChartFactory = Factory<{ props: LineChartProps; ref: HTMLDivElement; stylesNames: LineChartStylesNames; vars: LineChartCssVariables; }>; export declare const LineChart: import("@mantine/core").MantineComponent<{ props: LineChartProps; ref: HTMLDivElement; stylesNames: LineChartStylesNames; vars: LineChartCssVariables; }>;