@mui/x-charts
Version:
The community edition of MUI X Charts components.
55 lines • 1.71 kB
text/typescript
import * as React from 'react';
import { type SlotComponentPropsFromProps } from '@mui/x-internals/types';
import { type AnimatedLineProps } from "./AnimatedLine.mjs";
import { type SeriesId } from "../models/seriesType/common.mjs";
import { type LineClasses } from "./lineClasses.mjs";
export interface LineElementOwnerState {
seriesId: SeriesId;
color: string;
gradientId?: string;
isFaded: boolean;
isHighlighted: boolean;
classes?: Partial<LineClasses>;
/** If `true`, the line is hidden. */
hidden?: boolean;
}
export interface LineElementSlots {
/**
* The component that renders the line.
* @default LineElementPath
*/
line?: React.JSXElementConstructor<AnimatedLineProps>;
}
export interface LineElementSlotProps {
line?: SlotComponentPropsFromProps<AnimatedLineProps, {}, LineElementOwnerState>;
}
export interface LineElementProps extends Omit<LineElementOwnerState, 'isFaded' | 'isHighlighted'>, Pick<AnimatedLineProps, 'skipAnimation'>, Omit<React.SVGProps<SVGPathElement>, 'ref' | 'color'> {
d: string;
/** If `true`, the line is hidden. */
hidden?: boolean;
/**
* The props used for each component slot.
* @default {}
*/
slotProps?: LineElementSlotProps;
/**
* Overridable component slots.
* @default {}
*/
slots?: LineElementSlots;
}
/**
* Demos:
*
* - [Lines](https://mui.com/x/react-charts/lines/)
* - [Line demonstration](https://mui.com/x/react-charts/line-demo/)
*
* API:
*
* - [LineElement API](https://mui.com/x/api/charts/line-element/)
*/
declare function LineElement(props: LineElementProps): import("react/jsx-runtime").JSX.Element;
declare namespace LineElement {
var propTypes: any;
}
export { LineElement };