1 |
|
2 |
|
3 |
|
4 | import React from 'react';
|
5 | import { CurveFactory } from 'victory-vendor/d3-shape';
|
6 | import { LayoutType, PresentationAttributesWithProps } from '../util/types';
|
7 | export type CurveType = 'basis' | 'basisClosed' | 'basisOpen' | 'bumpX' | 'bumpY' | 'bump' | 'linear' | 'linearClosed' | 'natural' | 'monotoneX' | 'monotoneY' | 'monotone' | 'step' | 'stepBefore' | 'stepAfter' | CurveFactory;
|
8 | export interface Point {
|
9 | x: number;
|
10 | y: number;
|
11 | }
|
12 | interface CurveProps {
|
13 | className?: string;
|
14 | type?: CurveType;
|
15 | layout?: LayoutType;
|
16 | baseLine?: number | Array<Point>;
|
17 | points?: Array<Point>;
|
18 | connectNulls?: boolean;
|
19 | path?: string;
|
20 | pathRef?: (ref: SVGPathElement) => void;
|
21 | }
|
22 | export type Props = Omit<PresentationAttributesWithProps<CurveProps, SVGPathElement>, 'type' | 'points'> & CurveProps;
|
23 | type GetPathProps = Pick<Props, 'type' | 'points' | 'baseLine' | 'layout' | 'connectNulls'>;
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export declare const getPath: ({ type, points, baseLine, layout, connectNulls, }: GetPathProps) => string | null;
|
29 | export declare const Curve: React.FC<Props>;
|
30 | export {};
|