1 | import React, { SVGProps } from 'react';
|
2 | import { Props as XAxisProps } from './XAxis';
|
3 | import { Props as YAxisProps } from './YAxis';
|
4 | import { D3Scale, DataKey } from '../util/types';
|
5 | import { BarRectangleItem } from './Bar';
|
6 | import { LinePointItem } from './Line';
|
7 | import { ScatterPointItem } from './Scatter';
|
8 | export interface ErrorBarDataItem {
|
9 | x: number;
|
10 | y: number;
|
11 | value: number;
|
12 | errorVal?: number[] | number;
|
13 | }
|
14 | export type ErrorBarDataPointFormatter = (entry: BarRectangleItem | LinePointItem | ScatterPointItem, dataKey: DataKey<any>) => ErrorBarDataItem;
|
15 | interface InternalErrorBarProps {
|
16 | xAxis?: Omit<XAxisProps, 'scale'> & {
|
17 | scale: D3Scale<string | number>;
|
18 | };
|
19 | yAxis?: Omit<YAxisProps, 'scale'> & {
|
20 | scale: D3Scale<string | number>;
|
21 | };
|
22 | data?: any[];
|
23 | layout?: 'horizontal' | 'vertical';
|
24 | dataPointFormatter?: ErrorBarDataPointFormatter;
|
25 | offset?: number;
|
26 | }
|
27 | interface ErrorBarProps extends InternalErrorBarProps {
|
28 | dataKey: DataKey<any>;
|
29 | width?: number;
|
30 | direction?: 'x' | 'y';
|
31 | }
|
32 | export type Props = SVGProps<SVGLineElement> & ErrorBarProps;
|
33 | export declare function ErrorBar(props: Props): React.JSX.Element;
|
34 | export declare namespace ErrorBar {
|
35 | var defaultProps: {
|
36 | stroke: string;
|
37 | strokeWidth: number;
|
38 | width: number;
|
39 | offset: number;
|
40 | layout: string;
|
41 | };
|
42 | var displayName: string;
|
43 | }
|
44 | export {};
|