@visx/shape
Version:
visx shape
23 lines • 1.29 kB
TypeScript
import type { ReactNode, SVGProps } from 'react';
import type { GetLineSegmentsConfig } from '../util/getSplitLineSegments';
import type { LinePathConfig } from '../types';
export type SplitLinePathRenderer = (renderProps: {
index: number;
segment: {
x: number;
y: number;
}[];
styles?: Omit<SVGProps<SVGPathElement>, 'x' | 'y' | 'children'>;
}) => ReactNode;
export type SplitLinePathProps<Datum> = {
/** Array of data segments, where each segment will be a separate path in the rendered line. */
segments: Datum[][];
/** Styles to apply to each segment. If fewer styles are specified than the number of segments, they will be re-used. */
styles: Omit<SVGProps<SVGPathElement>, 'x' | 'y' | 'children'>[];
/** Override render function which is passed the configured path generator as input. */
children?: SplitLinePathRenderer;
/** className applied to path element. */
className?: string;
} & LinePathConfig<Datum> & Pick<GetLineSegmentsConfig, 'segmentation' | 'sampleRate'>;
export default function SplitLinePath<Datum>({ children, className, curve, defined, segmentation, sampleRate, segments, x, y, styles, }: SplitLinePathProps<Datum>): import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=SplitLinePath.d.ts.map