UNPKG

@mui/x-charts

Version:

The community edition of the charts components (MUI X).

60 lines (59 loc) 2.67 kB
import * as React from 'react'; import { AreaPlotSlotProps, AreaPlotSlots } from './AreaPlot'; import { LinePlotSlotProps, LinePlotSlots } from './LinePlot'; import { ResponsiveChartContainerProps } from '../ResponsiveChartContainer'; import { MarkPlotSlotProps, MarkPlotSlots } from './MarkPlot'; import { ChartsAxisProps } from '../ChartsAxis/ChartsAxis'; import { LineSeriesType } from '../models/seriesType/line'; import { MakeOptional } from '../models/helpers'; import { ChartsTooltipProps, ChartsTooltipSlotProps, ChartsTooltipSlots } from '../ChartsTooltip'; import { ChartsLegendProps, ChartsLegendSlotProps, ChartsLegendSlots } from '../ChartsLegend'; import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight'; import { ChartsAxisSlotProps, ChartsAxisSlots } from '../models/axis'; import { LineHighlightPlotSlots, LineHighlightPlotSlotProps } from './LineHighlightPlot'; export interface LineChartSlots extends ChartsAxisSlots, AreaPlotSlots, LinePlotSlots, MarkPlotSlots, LineHighlightPlotSlots, ChartsLegendSlots, ChartsTooltipSlots { } export interface LineChartSlotProps extends ChartsAxisSlotProps, AreaPlotSlotProps, LinePlotSlotProps, MarkPlotSlotProps, LineHighlightPlotSlotProps, ChartsLegendSlotProps, ChartsTooltipSlotProps { } export interface LineChartProps extends Omit<ResponsiveChartContainerProps, 'series'>, Omit<ChartsAxisProps, 'slots' | 'slotProps'> { series: MakeOptional<LineSeriesType, 'type'>[]; tooltip?: ChartsTooltipProps; /** * Object `{ x, y }` that defines how the charts highlight the mouse position along the x- and y-axes. * The two properties accept the following values: * - 'none': display nothing. * - 'line': display a line at the current mouse position. * - 'band': display a band at the current mouse position. Only available with band scale. */ axisHighlight?: ChartsAxisHighlightProps; /** * @deprecated Consider using `slotProps.legend` instead. */ legend?: ChartsLegendProps; /** * If `true`, render the line highlight item. */ disableLineItemHighlight?: boolean; /** * Overridable component slots. * @default {} */ slots?: LineChartSlots; /** * The props used for each component slot. * @default {} */ slotProps?: LineChartSlotProps; } /** * Demos: * * - [Lines](https://mui.com/x/react-charts/lines/) * - [Line demonstration](https://mui.com/x/react-charts/line-demo/) * * API: * * - [LineChart API](https://mui.com/x/api/charts/line-chart/) */ declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<unknown>>; export { LineChart };