import { ScatterChart as ReChartsScatterChart, ScatterProps } from 'recharts'; import { BoxProps, ElementProps, Factory, MantineColor, StylesApiProps } from '@mantine/core'; import { ChartLegendStylesNames } from '../ChartLegend'; import { ChartTooltipStylesNames } from '../ChartTooltip'; import { BaseChartStylesNames, GridChartBaseProps } from '../types'; export interface ScatterChartSeries { color: MantineColor; name: string; data: Record[]; } export type ScatterChartStylesNames = 'scatter' | BaseChartStylesNames | ChartLegendStylesNames | ChartTooltipStylesNames; export type ScatterChartCssVariables = { root: '--chart-text-color' | '--chart-grid-color'; }; export interface ScatterChartProps extends Omit, BoxProps, StylesApiProps, ElementProps<'div'> { /** Keys that should be used to retrieve data from the data array on x and y axis */ dataKey: { x: string; y: string; }; /** Data that is used to build the chart */ data: ScatterChartSeries[]; /** Units displayed after value on axis and inside the tooltip */ unit?: { x?: string; y?: string; }; /** Labels that should be used instead of keys names in the tooltip */ labels?: { x?: string; y?: string; }; /** A function to format values on x/y axis and in the tooltip */ valueFormatter?: GridChartBaseProps['valueFormatter'] | { x?: GridChartBaseProps['valueFormatter']; y?: GridChartBaseProps['valueFormatter']; }; /** Props passed down to recharts `ScatterChart` component */ scatterChartProps?: React.ComponentPropsWithoutRef; /** Props passed down to recharts `Scatter` component */ scatterProps?: Partial>; /** If set, displays labels next to points for the given axis */ pointLabels?: 'x' | 'y'; } export type ScatterChartFactory = Factory<{ props: ScatterChartProps; ref: HTMLDivElement; stylesNames: ScatterChartStylesNames; vars: ScatterChartCssVariables; }>; export declare const ScatterChart: import("@mantine/core").MantineComponent<{ props: ScatterChartProps; ref: HTMLDivElement; stylesNames: ScatterChartStylesNames; vars: ScatterChartCssVariables; }>;