UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

77 lines 3.74 kB
import * as React from 'react'; import { MakeOptional } from '@mui/x-internals/types'; import { ChartsToolbarSlotProps, ChartsToolbarSlots } from "../Toolbar/index.js"; import { ChartsSlots, ChartsSlotProps } from "../internals/material/index.js"; import { ScatterPlotProps, ScatterPlotSlotProps, ScatterPlotSlots } from "./ScatterPlot.js"; import { ChartContainerProps } from "../ChartContainer/index.js"; import { ChartsAxisProps } from "../ChartsAxis/index.js"; import { ScatterSeriesType } from "../models/seriesType/scatter.js"; import { ChartsTooltipSlots, ChartsTooltipSlotProps } from "../ChartsTooltip/ChartTooltip.types.js"; import { ChartsLegendSlotProps, ChartsLegendSlots } from "../ChartsLegend/index.js"; import { ChartsOverlayProps, ChartsOverlaySlotProps, ChartsOverlaySlots } from "../ChartsOverlay/index.js"; import { ChartsAxisHighlightProps } from "../ChartsAxisHighlight/index.js"; import { ChartsAxisSlots, ChartsAxisSlotProps } from "../models/axis.js"; import { ChartsGridProps } from "../ChartsGrid/index.js"; import { UseChartVoronoiSignature } from "../internals/plugins/featurePlugins/useChartVoronoi/index.js"; import { ScatterChartPluginsSignatures } from "./ScatterChart.plugins.js"; export interface ScatterChartSlots extends ChartsAxisSlots, ScatterPlotSlots, ChartsLegendSlots, ChartsOverlaySlots, ChartsTooltipSlots, ChartsToolbarSlots, Partial<ChartsSlots> {} export interface ScatterChartSlotProps extends ChartsAxisSlotProps, ScatterPlotSlotProps, ChartsLegendSlotProps, ChartsOverlaySlotProps, ChartsTooltipSlotProps, ChartsToolbarSlotProps, Partial<ChartsSlotProps> {} export interface ScatterChartProps extends Omit<ChartContainerProps<'scatter', ScatterChartPluginsSignatures>, 'series' | 'plugins' | 'onItemClick'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'>, Omit<ChartsOverlayProps, 'slots' | 'slotProps'> { /** * The series to display in the scatter chart. * An array of [[ScatterSeriesType]] objects. */ series: Readonly<MakeOptional<ScatterSeriesType, 'type'>[]>; /** * The configuration of axes highlight. * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details. * @default { x: 'none', y: 'none' } */ axisHighlight?: ChartsAxisHighlightProps; /** * Option to display a cartesian grid in the background. */ grid?: Pick<ChartsGridProps, 'vertical' | 'horizontal'>; /** * If true, the interaction will not use the Voronoi cell and fall back to hover events. * @default false */ disableVoronoi?: boolean; /** * If `true`, the legend is not rendered. */ hideLegend?: boolean; /** * If true, shows the default chart toolbar. * @default false */ showToolbar?: boolean; /** * Overridable component slots. * @default {} */ slots?: ScatterChartSlots; /** * The props used for each component slot. * @default {} */ slotProps?: ScatterChartSlotProps; /** * Callback fired when clicking on a scatter item. * @param {MouseEvent} event The mouse event recorded on the `<svg/>` element if using Voronoi cells. Or the Mouse event from the scatter element, when `disableVoronoi=true`. * @param {ScatterItemIdentifier} scatterItemIdentifier The scatter item identifier. */ onItemClick?: ScatterPlotProps['onItemClick'] | UseChartVoronoiSignature['params']['onItemClick']; } /** * Demos: * * - [Scatter](https://mui.com/x/react-charts/scatter/) * - [Scatter demonstration](https://mui.com/x/react-charts/scatter-demo/) * * API: * * - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/) */ declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & React.RefAttributes<SVGSVGElement>>; export { ScatterChart };