UNPKG

@mui/x-charts

Version:

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

60 lines (59 loc) 2.96 kB
import * as React from 'react'; import { AreaPlotSlotComponentProps, AreaPlotSlotsComponent } from './AreaPlot'; import { LinePlotSlotComponentProps, LinePlotSlotsComponent } from './LinePlot'; import { ResponsiveChartContainerProps } from '../ResponsiveChartContainer'; import { MarkPlotSlotComponentProps, MarkPlotSlotsComponent } from './MarkPlot'; import { ChartsAxisProps } from '../ChartsAxis/ChartsAxis'; import { LineSeriesType } from '../models/seriesType/line'; import { MakeOptional } from '../models/helpers'; import { ChartsTooltipProps, ChartsTooltipSlotComponentProps, ChartsTooltipSlotsComponent } from '../ChartsTooltip'; import { ChartsLegendProps, ChartsLegendSlotComponentProps, ChartsLegendSlotsComponent } from '../ChartsLegend'; import { ChartsAxisHighlightProps } from '../ChartsAxisHighlight'; import { ChartsAxisSlotComponentProps, ChartsAxisSlotsComponent } from '../models/axis'; import { LineHighlightPlotSlotsComponent, LineHighlightPlotSlotComponentProps } from './LineHighlightPlot'; export interface LineChartSlotsComponent extends ChartsAxisSlotsComponent, AreaPlotSlotsComponent, LinePlotSlotsComponent, MarkPlotSlotsComponent, LineHighlightPlotSlotsComponent, ChartsLegendSlotsComponent, ChartsTooltipSlotsComponent { } export interface LineChartSlotComponentProps extends ChartsAxisSlotComponentProps, AreaPlotSlotComponentProps, LinePlotSlotComponentProps, MarkPlotSlotComponentProps, LineHighlightPlotSlotComponentProps, ChartsLegendSlotComponentProps, ChartsTooltipSlotComponentProps { } 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?: LineChartSlotsComponent; /** * The props used for each component slot. * @default {} */ slotProps?: LineChartSlotComponentProps; } /** * 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 };