victory-core 36.3.2 → 36.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/victory-core.js +15084 -15018
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +38 -941
- package/es/index.js +19 -28
- package/es/types.d.ts +33 -0
- package/es/types.js +1 -0
- package/es/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/es/victory-accessible-group/victory-accessible-group.js +35 -45
- package/es/victory-animation/util.d.ts +66 -0
- package/es/victory-animation/util.js +3 -2
- package/es/victory-animation/victory-animation.d.ts +69 -0
- package/es/victory-animation/victory-animation.js +92 -102
- package/es/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/es/victory-clip-container/victory-clip-container.js +75 -82
- package/es/victory-container/victory-container.d.ts +99 -0
- package/es/victory-container/victory-container.js +97 -107
- package/es/victory-label/victory-label.d.ts +61 -0
- package/es/victory-label/victory-label.js +43 -31
- package/es/victory-portal/portal-context.d.ts +11 -0
- package/es/victory-portal/portal-context.js +3 -4
- package/es/victory-portal/portal.d.ts +28 -0
- package/es/victory-portal/portal.js +44 -50
- package/es/victory-portal/victory-portal.d.ts +31 -0
- package/es/victory-portal/victory-portal.js +38 -47
- package/es/victory-primitives/arc.d.ts +21 -0
- package/es/victory-primitives/arc.js +9 -9
- package/es/victory-primitives/background.d.ts +22 -0
- package/es/victory-primitives/background.js +12 -12
- package/es/victory-primitives/border.d.ts +18 -0
- package/es/victory-primitives/border.js +9 -9
- package/es/victory-primitives/circle.d.ts +2 -0
- package/es/victory-primitives/circle.js +17 -10
- package/es/victory-primitives/clip-path.d.ts +14 -0
- package/es/victory-primitives/clip-path.js +6 -6
- package/es/victory-primitives/index.d.ts +14 -0
- package/es/victory-primitives/index.js +14 -0
- package/es/victory-primitives/line-segment.d.ts +19 -0
- package/es/victory-primitives/line-segment.js +9 -9
- package/es/victory-primitives/line.d.ts +2 -0
- package/es/victory-primitives/line.js +17 -10
- package/es/victory-primitives/path.d.ts +2 -0
- package/es/victory-primitives/path.js +15 -8
- package/es/victory-primitives/point.d.ts +21 -0
- package/es/victory-primitives/point.js +15 -23
- package/es/victory-primitives/rect.d.ts +2 -0
- package/es/victory-primitives/rect.js +17 -10
- package/es/victory-primitives/text.d.ts +16 -0
- package/es/victory-primitives/text.js +13 -8
- package/es/victory-primitives/tspan.d.ts +2 -0
- package/es/victory-primitives/tspan.js +7 -6
- package/es/victory-primitives/types.d.ts +7 -0
- package/es/victory-primitives/types.js +1 -0
- package/es/victory-primitives/whisker.d.ts +24 -0
- package/es/victory-primitives/whisker.js +12 -12
- package/es/victory-theme/grayscale.d.ts +2 -0
- package/es/victory-theme/grayscale.js +1 -1
- package/es/victory-theme/material.d.ts +2 -0
- package/es/victory-theme/material.js +1 -1
- package/es/victory-theme/victory-theme-definition.d.ts +244 -0
- package/es/victory-theme/victory-theme-definition.js +1 -0
- package/es/victory-theme/victory-theme.d.ts +5 -0
- package/es/victory-theme/victory-theme.js +6 -5
- package/es/victory-transition/victory-transition.d.ts +59 -0
- package/es/victory-transition/victory-transition.js +38 -44
- package/es/victory-util/add-events.js +328 -319
- package/es/victory-util/axis.js +12 -6
- package/es/victory-util/collection.js +7 -5
- package/es/victory-util/common-props.js +2 -2
- package/es/victory-util/data.js +8 -6
- package/es/victory-util/default-transitions.js +0 -1
- package/es/victory-util/domain.js +7 -5
- package/es/victory-util/events.js +8 -4
- package/es/victory-util/helpers.js +1 -3
- package/es/victory-util/hooks/use-animation-state.js +11 -5
- package/es/victory-util/immutable.js +0 -1
- package/es/victory-util/label-helpers.js +0 -2
- package/es/victory-util/line-helpers.js +1 -1
- package/es/victory-util/log.js +0 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -0
- package/es/victory-util/point-path-helpers.js +59 -61
- package/es/victory-util/scale.js +19 -19
- package/es/victory-util/selection.d.ts +23 -0
- package/es/victory-util/selection.js +0 -2
- package/es/victory-util/style.js +0 -2
- package/es/victory-util/textsize.d.ts +8 -0
- package/es/victory-util/textsize.js +11 -7
- package/es/victory-util/timer-context.d.ts +11 -0
- package/es/victory-util/timer-context.js +1 -1
- package/es/victory-util/timer.d.ts +16 -0
- package/es/victory-util/timer.js +16 -13
- package/es/victory-util/types.d.ts +188 -0
- package/es/victory-util/types.js +1 -0
- package/es/victory-util/user-props.js +44 -4
- package/es/victory-util/wrapper.js +18 -12
- package/lib/index.d.ts +38 -941
- package/lib/index.js +201 -189
- package/lib/types.d.ts +33 -0
- package/lib/types.js +1 -0
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +25 -0
- package/lib/victory-accessible-group/victory-accessible-group.js +37 -45
- package/lib/victory-animation/util.d.ts +66 -0
- package/lib/victory-animation/util.js +4 -3
- package/lib/victory-animation/victory-animation.d.ts +69 -0
- package/lib/victory-animation/victory-animation.js +97 -102
- package/lib/victory-clip-container/victory-clip-container.d.ts +76 -0
- package/lib/victory-clip-container/victory-clip-container.js +81 -82
- package/lib/victory-container/victory-container.d.ts +99 -0
- package/lib/victory-container/victory-container.js +102 -107
- package/lib/victory-label/victory-label.d.ts +61 -0
- package/lib/victory-label/victory-label.js +49 -32
- package/lib/victory-portal/portal-context.d.ts +11 -0
- package/lib/victory-portal/portal-context.js +4 -5
- package/lib/victory-portal/portal.d.ts +28 -0
- package/lib/victory-portal/portal.js +49 -50
- package/lib/victory-portal/victory-portal.d.ts +31 -0
- package/lib/victory-portal/victory-portal.js +43 -47
- package/lib/victory-primitives/arc.d.ts +21 -0
- package/lib/victory-primitives/arc.js +13 -10
- package/lib/victory-primitives/background.d.ts +22 -0
- package/lib/victory-primitives/background.js +16 -13
- package/lib/victory-primitives/border.d.ts +18 -0
- package/lib/victory-primitives/border.js +13 -10
- package/lib/victory-primitives/circle.d.ts +2 -0
- package/lib/victory-primitives/circle.js +17 -8
- package/lib/victory-primitives/clip-path.d.ts +14 -0
- package/lib/victory-primitives/clip-path.js +7 -5
- package/lib/victory-primitives/index.d.ts +14 -0
- package/lib/victory-primitives/index.js +187 -0
- package/lib/victory-primitives/line-segment.d.ts +19 -0
- package/lib/victory-primitives/line-segment.js +13 -10
- package/lib/victory-primitives/line.d.ts +2 -0
- package/lib/victory-primitives/line.js +17 -8
- package/lib/victory-primitives/path.d.ts +2 -0
- package/lib/victory-primitives/path.js +15 -6
- package/lib/victory-primitives/point.d.ts +21 -0
- package/lib/victory-primitives/point.js +21 -25
- package/lib/victory-primitives/rect.d.ts +2 -0
- package/lib/victory-primitives/rect.js +17 -8
- package/lib/victory-primitives/text.d.ts +16 -0
- package/lib/victory-primitives/text.js +14 -7
- package/lib/victory-primitives/tspan.d.ts +2 -0
- package/lib/victory-primitives/tspan.js +7 -4
- package/lib/victory-primitives/types.d.ts +7 -0
- package/lib/victory-primitives/types.js +1 -0
- package/lib/victory-primitives/whisker.d.ts +24 -0
- package/lib/victory-primitives/whisker.js +16 -13
- package/lib/victory-theme/grayscale.d.ts +2 -0
- package/lib/victory-theme/grayscale.js +3 -3
- package/lib/victory-theme/material.d.ts +2 -0
- package/lib/victory-theme/material.js +3 -3
- package/lib/victory-theme/victory-theme-definition.d.ts +244 -0
- package/lib/victory-theme/victory-theme-definition.js +1 -0
- package/lib/victory-theme/victory-theme.d.ts +5 -0
- package/lib/victory-theme/victory-theme.js +22 -8
- package/lib/victory-transition/victory-transition.d.ts +59 -0
- package/lib/victory-transition/victory-transition.js +43 -45
- package/lib/victory-util/add-events.js +326 -316
- package/lib/victory-util/axis.js +20 -11
- package/lib/victory-util/collection.js +10 -8
- package/lib/victory-util/common-props.js +6 -4
- package/lib/victory-util/data.js +13 -7
- package/lib/victory-util/default-transitions.js +1 -2
- package/lib/victory-util/domain.js +11 -5
- package/lib/victory-util/events.js +17 -11
- package/lib/victory-util/helpers.js +14 -16
- package/lib/victory-util/hooks/index.js +4 -4
- package/lib/victory-util/hooks/use-animation-state.js +14 -6
- package/lib/victory-util/immutable.js +3 -5
- package/lib/victory-util/label-helpers.js +6 -6
- package/lib/victory-util/line-helpers.js +4 -2
- package/lib/victory-util/log.js +0 -1
- package/lib/victory-util/point-path-helpers.d.ts +9 -0
- package/lib/victory-util/point-path-helpers.js +86 -73
- package/lib/victory-util/prop-types.js +5 -3
- package/lib/victory-util/scale.js +24 -21
- package/lib/victory-util/selection.d.ts +23 -0
- package/lib/victory-util/selection.js +5 -5
- package/lib/victory-util/style.js +0 -2
- package/lib/victory-util/textsize.d.ts +8 -0
- package/lib/victory-util/textsize.js +12 -8
- package/lib/victory-util/timer-context.d.ts +11 -0
- package/lib/victory-util/timer-context.js +1 -1
- package/lib/victory-util/timer.d.ts +16 -0
- package/lib/victory-util/timer.js +16 -13
- package/lib/victory-util/types.d.ts +188 -0
- package/lib/victory-util/types.js +1 -0
- package/lib/victory-util/user-props.js +53 -6
- package/lib/victory-util/wrapper.js +31 -23
- package/package.json +6 -13
- package/src/index.ts +42 -0
- package/src/types.ts +45 -0
- package/src/victory-accessible-group/{victory-accessible-group.js → victory-accessible-group.tsx} +10 -3
- package/src/victory-animation/{util.js → util.ts} +5 -4
- package/src/victory-animation/{victory-animation.js → victory-animation.tsx} +90 -13
- package/src/victory-clip-container/{victory-clip-container.js → victory-clip-container.tsx} +32 -6
- package/src/victory-container/{victory-container.js → victory-container.tsx} +70 -26
- package/src/victory-label/{victory-label.js → victory-label.tsx} +80 -19
- package/src/victory-portal/portal-context.ts +14 -0
- package/src/victory-portal/{portal.js → portal.tsx} +23 -12
- package/src/victory-portal/{victory-portal.js → victory-portal.tsx} +21 -6
- package/src/victory-primitives/{arc.js → arc.tsx} +15 -5
- package/src/victory-primitives/{background.js → background.tsx} +17 -7
- package/src/victory-primitives/{border.js → border.tsx} +12 -5
- package/src/victory-primitives/{circle.js → circle.tsx} +4 -3
- package/src/victory-primitives/clip-path.tsx +25 -0
- package/src/victory-primitives/index.ts +14 -0
- package/src/victory-primitives/{line-segment.js → line-segment.tsx} +13 -5
- package/src/victory-primitives/{line.js → line.tsx} +4 -3
- package/src/victory-primitives/{path.js → path.tsx} +4 -3
- package/src/victory-primitives/{point.js → point.tsx} +25 -20
- package/src/victory-primitives/{rect.js → rect.tsx} +4 -2
- package/src/victory-primitives/{text.js → text.tsx} +9 -3
- package/src/victory-primitives/tspan.tsx +7 -0
- package/src/victory-primitives/types.ts +19 -0
- package/src/victory-primitives/{whisker.js → whisker.tsx} +20 -7
- package/src/victory-theme/{grayscale.js → grayscale.tsx} +2 -1
- package/src/victory-theme/{material.js → material.tsx} +2 -1
- package/src/victory-theme/victory-theme-definition.ts +261 -0
- package/src/victory-theme/victory-theme.tsx +5 -0
- package/src/victory-transition/{victory-transition.js → victory-transition.tsx} +68 -19
- package/src/victory-util/add-events.js +7 -5
- package/src/victory-util/axis.js +3 -1
- package/src/victory-util/collection.js +0 -1
- package/src/victory-util/common-props.js +2 -2
- package/src/victory-util/data.js +0 -1
- package/src/victory-util/default-transitions.js +0 -1
- package/src/victory-util/domain.js +0 -1
- package/src/victory-util/events.js +1 -1
- package/src/victory-util/helpers.js +0 -1
- package/src/victory-util/immutable.js +0 -1
- package/src/victory-util/label-helpers.js +0 -1
- package/src/victory-util/line-helpers.js +1 -1
- package/src/victory-util/log.js +0 -1
- package/src/victory-util/point-path-helpers.ts +119 -0
- package/src/victory-util/prop-types.js +0 -1
- package/src/victory-util/scale.js +18 -10
- package/src/victory-util/selection.d.ts +23 -0
- package/src/victory-util/selection.js +0 -1
- package/src/victory-util/style.js +0 -1
- package/src/victory-util/textsize.d.ts +8 -0
- package/src/victory-util/{timer-context.js → timer-context.ts} +0 -0
- package/src/victory-util/{timer.js → timer.ts} +20 -5
- package/src/victory-util/transitions.js +0 -1
- package/src/victory-util/types.ts +247 -0
- package/src/victory-util/user-props.js +31 -1
- package/src/victory-util/wrapper.js +0 -1
- package/src/index.d.ts +0 -941
- package/src/index.js +0 -51
- package/src/victory-portal/portal-context.js +0 -10
- package/src/victory-primitives/clip-path.js +0 -18
- package/src/victory-primitives/tspan.js +0 -5
- package/src/victory-theme/victory-theme.js +0 -7
- package/src/victory-util/point-path-helpers.js +0 -121
package/lib/index.d.ts
CHANGED
|
@@ -1,941 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
*
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
export
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
| "exp"
|
|
40
|
-
| "expIn"
|
|
41
|
-
| "expOut"
|
|
42
|
-
| "expInOut"
|
|
43
|
-
| "poly"
|
|
44
|
-
| "polyIn"
|
|
45
|
-
| "polyOut"
|
|
46
|
-
| "polyInOut"
|
|
47
|
-
| "quad"
|
|
48
|
-
| "quadIn"
|
|
49
|
-
| "quadOut"
|
|
50
|
-
| "quadInOut"
|
|
51
|
-
| "sin"
|
|
52
|
-
| "sinIn"
|
|
53
|
-
| "sinOut"
|
|
54
|
-
| "sinInOut";
|
|
55
|
-
|
|
56
|
-
export type ScatterSymbolType =
|
|
57
|
-
| "circle"
|
|
58
|
-
| "cross"
|
|
59
|
-
| "diamond"
|
|
60
|
-
| "plus"
|
|
61
|
-
| "minus"
|
|
62
|
-
| "square"
|
|
63
|
-
| "star"
|
|
64
|
-
| "triangleDown"
|
|
65
|
-
| "triangleUp";
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @see https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-8.html
|
|
69
|
-
*/
|
|
70
|
-
export type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
71
|
-
|
|
72
|
-
export type BlockProps = {
|
|
73
|
-
top?: number;
|
|
74
|
-
bottom?: number;
|
|
75
|
-
left?: number;
|
|
76
|
-
right?: number;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export type PaddingProps = number | BlockProps;
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* This is the first parameter of a callback when a callback is used to
|
|
83
|
-
* resolve the value of a property instead of a concrete value.
|
|
84
|
-
*
|
|
85
|
-
* Note that additional properties here like `scale`, `x`, `y`, etc are resolved
|
|
86
|
-
* values of properties from the VictoryXXXProps for each component.
|
|
87
|
-
*/
|
|
88
|
-
export interface CallbackArgs {
|
|
89
|
-
active?: boolean;
|
|
90
|
-
data?: any;
|
|
91
|
-
datum?: any;
|
|
92
|
-
horizontal?: boolean;
|
|
93
|
-
index: number | string;
|
|
94
|
-
x?: number;
|
|
95
|
-
y?: number;
|
|
96
|
-
scale?: {
|
|
97
|
-
x?: D3Scale;
|
|
98
|
-
y?: D3Scale;
|
|
99
|
-
};
|
|
100
|
-
tick?: any;
|
|
101
|
-
ticks?: any;
|
|
102
|
-
text?: any;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export type OrientationTypes = "top" | "bottom" | "left" | "right";
|
|
106
|
-
|
|
107
|
-
export type VictoryStringOrNumberCallback = (
|
|
108
|
-
args: CallbackArgs
|
|
109
|
-
) => string | number;
|
|
110
|
-
export type VictoryNumberCallback = (args: CallbackArgs) => number;
|
|
111
|
-
export type VictoryStringCallback = (args: CallbackArgs) => string;
|
|
112
|
-
export type VictoryPaddingCallback = (
|
|
113
|
-
args: CallbackArgs
|
|
114
|
-
) => number | BlockProps;
|
|
115
|
-
export type VictoryOrientationCallback = (
|
|
116
|
-
args: CallbackArgs
|
|
117
|
-
) => OrientationTypes;
|
|
118
|
-
export type StringOrNumberOrCallback =
|
|
119
|
-
| string
|
|
120
|
-
| number
|
|
121
|
-
| VictoryStringOrNumberCallback;
|
|
122
|
-
export type NumberOrCallback = number | VictoryNumberCallback;
|
|
123
|
-
export type StringOrCallback = string | VictoryStringCallback;
|
|
124
|
-
export type PaddingOrCallback = number | BlockProps | VictoryPaddingCallback;
|
|
125
|
-
export type OrientationOrCallback =
|
|
126
|
-
| OrientationTypes
|
|
127
|
-
| VictoryOrientationCallback;
|
|
128
|
-
|
|
129
|
-
export type SliceNumberOrCallback<T, P = null> =
|
|
130
|
-
| number
|
|
131
|
-
| ((props: Omit<T, P>) => number);
|
|
132
|
-
|
|
133
|
-
export type StringOrNumberOrList = string | number | (string | number)[];
|
|
134
|
-
|
|
135
|
-
export type CoordinatesPropType = {
|
|
136
|
-
x: number;
|
|
137
|
-
y: number;
|
|
138
|
-
};
|
|
139
|
-
|
|
140
|
-
export type VictoryStyleObject = {
|
|
141
|
-
[K in keyof React.CSSProperties]: StringOrNumberOrCallback;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export type LabelProps = React.CSSProperties & {
|
|
145
|
-
angle?: number;
|
|
146
|
-
verticalAnchor?: VerticalAnchorType;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
export type VictoryLabelStyleObject = {
|
|
150
|
-
[K in keyof LabelProps]: StringOrNumberOrCallback;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Style interface used in components/themeing
|
|
155
|
-
*/
|
|
156
|
-
export interface VictoryStyleInterface {
|
|
157
|
-
parent?: VictoryStyleObject;
|
|
158
|
-
data?: VictoryStyleObject;
|
|
159
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
160
|
-
border?: VictoryStyleObject;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// #endregion
|
|
164
|
-
|
|
165
|
-
// #region Victory Animation
|
|
166
|
-
|
|
167
|
-
export interface VictoryAnimationProps {
|
|
168
|
-
children?: (style: AnimationStyle) => React.ReactElement;
|
|
169
|
-
duration?: number;
|
|
170
|
-
easing?: AnimationEasing;
|
|
171
|
-
delay?: number;
|
|
172
|
-
onEnd?: () => void;
|
|
173
|
-
data?: AnimationData;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export class VictoryAnimation extends React.Component<
|
|
177
|
-
VictoryAnimationProps,
|
|
178
|
-
any
|
|
179
|
-
> {}
|
|
180
|
-
|
|
181
|
-
// #endregion
|
|
182
|
-
|
|
183
|
-
// #region Victory Axis props
|
|
184
|
-
|
|
185
|
-
export type TickProps = React.CSSProperties & { size?: number };
|
|
186
|
-
|
|
187
|
-
export type VictoryTickStyleObject = {
|
|
188
|
-
[K in keyof TickProps]: StringOrNumberOrCallback;
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
export interface VictoryAxisCommonProps {
|
|
192
|
-
axisComponent?: React.ReactElement;
|
|
193
|
-
axisLabelComponent?: React.ReactElement;
|
|
194
|
-
axisValue?: number | string | object | Date;
|
|
195
|
-
dependentAxis?: boolean;
|
|
196
|
-
disableInlineStyles?: boolean;
|
|
197
|
-
gridComponent?: React.ReactElement;
|
|
198
|
-
invertAxis?: boolean;
|
|
199
|
-
style?: {
|
|
200
|
-
parent?: VictoryStyleObject;
|
|
201
|
-
axis?: VictoryStyleObject;
|
|
202
|
-
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
203
|
-
grid?: VictoryStyleObject;
|
|
204
|
-
ticks?: VictoryTickStyleObject;
|
|
205
|
-
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
206
|
-
};
|
|
207
|
-
tickComponent?: React.ReactElement;
|
|
208
|
-
tickCount?: number;
|
|
209
|
-
tickLabelComponent?: React.ReactElement;
|
|
210
|
-
tickFormat?:
|
|
211
|
-
| any[]
|
|
212
|
-
| { (tick: any, index: number, ticks: any[]): string | number };
|
|
213
|
-
tickValues?: any[];
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// #endregion
|
|
217
|
-
|
|
218
|
-
// #region Victory Label
|
|
219
|
-
|
|
220
|
-
export type TextAnchorType = "start" | "middle" | "end" | "inherit";
|
|
221
|
-
export type VerticalAnchorType = "start" | "middle" | "end";
|
|
222
|
-
export type OriginType = { x: number; y: number };
|
|
223
|
-
export type LabelOrientationType = "parallel" | "perpendicular" | "vertical";
|
|
224
|
-
|
|
225
|
-
export interface VictoryLabelProps {
|
|
226
|
-
angle?: StringOrNumberOrCallback;
|
|
227
|
-
ariaLabel?: StringOrCallback;
|
|
228
|
-
backgroundComponent?: React.ReactElement;
|
|
229
|
-
backgroundStyle?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
230
|
-
backgroundPadding?: PaddingProps | PaddingProps[];
|
|
231
|
-
capHeight?: StringOrNumberOrCallback;
|
|
232
|
-
children?: StringOrNumberOrCallback;
|
|
233
|
-
className?: string;
|
|
234
|
-
datum?: {};
|
|
235
|
-
data?: any[];
|
|
236
|
-
desc?: string;
|
|
237
|
-
direction?: string;
|
|
238
|
-
disableInlineStyles?: boolean;
|
|
239
|
-
events?: React.DOMAttributes<any>;
|
|
240
|
-
groupComponent?: React.ReactElement;
|
|
241
|
-
id?: StringOrNumberOrCallback;
|
|
242
|
-
inline?: boolean;
|
|
243
|
-
labelPlacement?: LabelOrientationType;
|
|
244
|
-
lineHeight?: StringOrNumberOrCallback | (string | number)[];
|
|
245
|
-
origin?: OriginType;
|
|
246
|
-
polar?: boolean;
|
|
247
|
-
renderInPortal?: boolean;
|
|
248
|
-
style?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
249
|
-
tabIndex?: NumberOrCallback;
|
|
250
|
-
text?: string[] | StringOrNumberOrCallback;
|
|
251
|
-
textComponent?: React.ReactElement;
|
|
252
|
-
textAnchor?: TextAnchorType | { (): TextAnchorType };
|
|
253
|
-
title?: string;
|
|
254
|
-
transform?: string | {} | { (): string | {} };
|
|
255
|
-
verticalAnchor?: VerticalAnchorType | { (): VerticalAnchorType };
|
|
256
|
-
x?: number;
|
|
257
|
-
y?: number;
|
|
258
|
-
dx?: StringOrNumberOrCallback;
|
|
259
|
-
dy?: StringOrNumberOrCallback;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export class VictoryLabel extends React.Component<VictoryLabelProps, any> {}
|
|
263
|
-
|
|
264
|
-
// #endregion
|
|
265
|
-
|
|
266
|
-
// #region Victory Container
|
|
267
|
-
|
|
268
|
-
export interface VictoryContainerProps {
|
|
269
|
-
"aria-describedby"?: string;
|
|
270
|
-
"aria-labelledby"?: string;
|
|
271
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
272
|
-
className?: string;
|
|
273
|
-
containerId?: number | string;
|
|
274
|
-
containerRef?: React.Ref<HTMLElement>;
|
|
275
|
-
desc?: string;
|
|
276
|
-
events?: React.DOMAttributes<any>;
|
|
277
|
-
height?: number;
|
|
278
|
-
name?: string;
|
|
279
|
-
origin?: OriginType;
|
|
280
|
-
ouiaId?: number | string;
|
|
281
|
-
ouiaSafe?: boolean;
|
|
282
|
-
ouiaType?: string;
|
|
283
|
-
polar?: boolean;
|
|
284
|
-
portalComponent?: React.ReactElement;
|
|
285
|
-
portalZIndex?: number;
|
|
286
|
-
preserveAspectRatio?: string;
|
|
287
|
-
responsive?: boolean;
|
|
288
|
-
role?: string;
|
|
289
|
-
scale?: {
|
|
290
|
-
x?: D3Scale;
|
|
291
|
-
y?: D3Scale;
|
|
292
|
-
};
|
|
293
|
-
style?: React.CSSProperties;
|
|
294
|
-
tabIndex?: number;
|
|
295
|
-
theme?: VictoryThemeDefinition;
|
|
296
|
-
title?: string;
|
|
297
|
-
width?: number;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
export class VictoryContainer extends React.Component<
|
|
301
|
-
VictoryContainerProps,
|
|
302
|
-
any
|
|
303
|
-
> {}
|
|
304
|
-
|
|
305
|
-
// #endregion
|
|
306
|
-
|
|
307
|
-
// #region Victory Clip Container
|
|
308
|
-
|
|
309
|
-
export interface VictoryClipContainerProps {
|
|
310
|
-
"aria-label"?: string;
|
|
311
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
312
|
-
circleComponent?: React.ReactElement;
|
|
313
|
-
className?: string;
|
|
314
|
-
clipHeight?: number;
|
|
315
|
-
clipId?: number | string;
|
|
316
|
-
clipPadding?: BlockProps;
|
|
317
|
-
clipPathComponent?: React.ReactElement;
|
|
318
|
-
clipWidth?: number;
|
|
319
|
-
events?: React.DOMAttributes<any>;
|
|
320
|
-
groupComponent?: React.ReactElement;
|
|
321
|
-
origin?: OriginType;
|
|
322
|
-
polar?: boolean;
|
|
323
|
-
radius?: number;
|
|
324
|
-
rectComponent?: React.ReactElement;
|
|
325
|
-
translateX?: number;
|
|
326
|
-
translateY?: number;
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export class VictoryClipContainer extends React.Component<
|
|
330
|
-
VictoryClipContainerProps,
|
|
331
|
-
any
|
|
332
|
-
> {}
|
|
333
|
-
|
|
334
|
-
// #endregion
|
|
335
|
-
|
|
336
|
-
// #region Victory Accessibile Group
|
|
337
|
-
|
|
338
|
-
export interface VictoryAccessibleGroupProps {
|
|
339
|
-
desc?: string;
|
|
340
|
-
"aria-describedby"?: string;
|
|
341
|
-
"aria-label": string;
|
|
342
|
-
children?: React.ReactElement | React.ReactElement[];
|
|
343
|
-
className?: string;
|
|
344
|
-
tabIndex?: number;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export class VictoryAccessibleGroup extends React.Component<
|
|
348
|
-
VictoryAccessibleGroupProps,
|
|
349
|
-
any
|
|
350
|
-
> {}
|
|
351
|
-
|
|
352
|
-
// #endregion
|
|
353
|
-
|
|
354
|
-
// #region Victory Theme
|
|
355
|
-
// Note: Many SVG attributes are missed in CSSProperties interface
|
|
356
|
-
export interface VictoryThemeDefinition {
|
|
357
|
-
area?: {
|
|
358
|
-
style?: {
|
|
359
|
-
data?: VictoryStyleObject;
|
|
360
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
361
|
-
};
|
|
362
|
-
} & VictoryCommonThemeProps &
|
|
363
|
-
VictoryDatableProps;
|
|
364
|
-
axis?: {
|
|
365
|
-
style?: {
|
|
366
|
-
axis?: VictoryStyleObject;
|
|
367
|
-
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
368
|
-
grid?: VictoryStyleObject;
|
|
369
|
-
ticks?: VictoryTickStyleObject;
|
|
370
|
-
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
371
|
-
};
|
|
372
|
-
offsetX?: number;
|
|
373
|
-
offsetY?: number;
|
|
374
|
-
} & VictoryCommonThemeProps;
|
|
375
|
-
bar?: {
|
|
376
|
-
style?: {
|
|
377
|
-
data?: VictoryStyleObject;
|
|
378
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
379
|
-
};
|
|
380
|
-
} & VictoryCommonThemeProps &
|
|
381
|
-
VictoryDatableProps;
|
|
382
|
-
boxplot?: {
|
|
383
|
-
style?: {
|
|
384
|
-
max?: VictoryStyleObject;
|
|
385
|
-
maxLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
386
|
-
median?: VictoryStyleObject;
|
|
387
|
-
medianLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
388
|
-
min?: VictoryStyleObject;
|
|
389
|
-
minLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
390
|
-
q1?: VictoryStyleObject;
|
|
391
|
-
q1Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
392
|
-
q3?: VictoryStyleObject;
|
|
393
|
-
q3Labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
394
|
-
};
|
|
395
|
-
boxWidth?: number;
|
|
396
|
-
} & VictoryCommonThemeProps;
|
|
397
|
-
candlestick?: {
|
|
398
|
-
style?: {
|
|
399
|
-
data?: VictoryStyleObject;
|
|
400
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
401
|
-
};
|
|
402
|
-
candleColors?: {
|
|
403
|
-
positive?: string;
|
|
404
|
-
negative?: string;
|
|
405
|
-
};
|
|
406
|
-
} & VictoryCommonThemeProps;
|
|
407
|
-
chart?: VictoryCommonThemeProps;
|
|
408
|
-
dependentAxis?: {
|
|
409
|
-
style?: {
|
|
410
|
-
axis?: VictoryStyleObject;
|
|
411
|
-
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
412
|
-
grid?: VictoryStyleObject;
|
|
413
|
-
ticks?: VictoryTickStyleObject;
|
|
414
|
-
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
415
|
-
};
|
|
416
|
-
offsetX?: number;
|
|
417
|
-
offsetY?: number;
|
|
418
|
-
orientation?: OrientationTypes;
|
|
419
|
-
} & VictoryCommonThemeProps;
|
|
420
|
-
errorbar?: {
|
|
421
|
-
borderWidth?: number;
|
|
422
|
-
style?: {
|
|
423
|
-
data?: VictoryStyleObject;
|
|
424
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
425
|
-
};
|
|
426
|
-
} & VictoryCommonThemeProps;
|
|
427
|
-
group?: {
|
|
428
|
-
style?: {
|
|
429
|
-
data?: VictoryStyleObject;
|
|
430
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
431
|
-
};
|
|
432
|
-
} & VictoryCommonThemeProps;
|
|
433
|
-
histogram?: {
|
|
434
|
-
style?: {
|
|
435
|
-
data?: VictoryStyleObject;
|
|
436
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
437
|
-
};
|
|
438
|
-
} & VictoryCommonThemeProps;
|
|
439
|
-
independentAxis?: {
|
|
440
|
-
style?: {
|
|
441
|
-
axis?: VictoryStyleObject;
|
|
442
|
-
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
443
|
-
grid?: VictoryStyleObject;
|
|
444
|
-
ticks?: VictoryTickStyleObject;
|
|
445
|
-
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
446
|
-
};
|
|
447
|
-
offsetX?: number;
|
|
448
|
-
offsetY?: number;
|
|
449
|
-
orientation?: OrientationTypes;
|
|
450
|
-
} & VictoryCommonThemeProps;
|
|
451
|
-
legend?: {
|
|
452
|
-
gutter?: number | BlockProps;
|
|
453
|
-
rowGutter?: number | BlockProps;
|
|
454
|
-
orientation?: string;
|
|
455
|
-
titleOrientation?: string;
|
|
456
|
-
style?: {
|
|
457
|
-
data?: VictoryStyleObject & {
|
|
458
|
-
type?: string;
|
|
459
|
-
};
|
|
460
|
-
border?: VictoryStyleObject;
|
|
461
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
462
|
-
title?: VictoryLabelStyleObject;
|
|
463
|
-
};
|
|
464
|
-
itemsPerRow?: number;
|
|
465
|
-
x?: number;
|
|
466
|
-
y?: number;
|
|
467
|
-
centerTitle?: boolean;
|
|
468
|
-
borderPadding?: number | BlockProps;
|
|
469
|
-
} & VictoryCommonThemeProps;
|
|
470
|
-
line?: {
|
|
471
|
-
style?: {
|
|
472
|
-
data?: VictoryStyleObject;
|
|
473
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
474
|
-
};
|
|
475
|
-
} & VictoryCommonThemeProps &
|
|
476
|
-
VictoryDatableProps;
|
|
477
|
-
pie?: {
|
|
478
|
-
style?: {
|
|
479
|
-
data?: VictoryStyleObject;
|
|
480
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
481
|
-
};
|
|
482
|
-
} & VictoryCommonThemeProps &
|
|
483
|
-
VictoryDatableProps;
|
|
484
|
-
polarAxis?: {
|
|
485
|
-
style?: {
|
|
486
|
-
axis?: VictoryStyleObject;
|
|
487
|
-
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
488
|
-
grid?: VictoryStyleObject;
|
|
489
|
-
ticks?: VictoryTickStyleObject;
|
|
490
|
-
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
491
|
-
};
|
|
492
|
-
} & VictoryCommonThemeProps;
|
|
493
|
-
polarDependentAxis?: {
|
|
494
|
-
style?: {
|
|
495
|
-
axis?: VictoryStyleObject;
|
|
496
|
-
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
497
|
-
grid?: VictoryStyleObject;
|
|
498
|
-
ticks?: VictoryTickStyleObject;
|
|
499
|
-
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
500
|
-
};
|
|
501
|
-
} & VictoryCommonThemeProps;
|
|
502
|
-
polarIndependentAxis?: {
|
|
503
|
-
style?: {
|
|
504
|
-
axis?: VictoryStyleObject;
|
|
505
|
-
axisLabel?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
506
|
-
grid?: VictoryStyleObject;
|
|
507
|
-
ticks?: VictoryTickStyleObject;
|
|
508
|
-
tickLabels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
509
|
-
};
|
|
510
|
-
} & VictoryCommonThemeProps;
|
|
511
|
-
scatter?: {
|
|
512
|
-
style?: {
|
|
513
|
-
data?: VictoryStyleObject;
|
|
514
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
515
|
-
};
|
|
516
|
-
} & VictoryCommonThemeProps &
|
|
517
|
-
VictoryDatableProps;
|
|
518
|
-
stack?: VictoryCommonThemeProps;
|
|
519
|
-
tooltip?: {
|
|
520
|
-
style?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
521
|
-
flyoutStyle?: VictoryStyleObject;
|
|
522
|
-
cornerRadius?: NumberOrCallback;
|
|
523
|
-
pointerLength?: NumberOrCallback;
|
|
524
|
-
flyoutPadding?: PaddingOrCallback;
|
|
525
|
-
flyoutWidth?: NumberOrCallback;
|
|
526
|
-
flyoutHeight?: NumberOrCallback;
|
|
527
|
-
orientation?: OrientationOrCallback;
|
|
528
|
-
pointerOrientation?: OrientationOrCallback;
|
|
529
|
-
};
|
|
530
|
-
voronoi?: {
|
|
531
|
-
style?: {
|
|
532
|
-
data?: VictoryStyleObject;
|
|
533
|
-
labels?: VictoryLabelStyleObject | VictoryLabelStyleObject[];
|
|
534
|
-
flyout?: VictoryStyleObject;
|
|
535
|
-
};
|
|
536
|
-
} & VictoryCommonThemeProps &
|
|
537
|
-
VictoryDatableProps;
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
export interface VictoryThemeInterface {
|
|
541
|
-
grayscale: VictoryThemeDefinition;
|
|
542
|
-
material: VictoryThemeDefinition;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
export const VictoryTheme: VictoryThemeInterface;
|
|
546
|
-
|
|
547
|
-
// #endregion
|
|
548
|
-
|
|
549
|
-
// #region Victory Util
|
|
550
|
-
|
|
551
|
-
export interface AnimatePropTypeInterface {
|
|
552
|
-
duration?: number;
|
|
553
|
-
onEnd?: () => void;
|
|
554
|
-
onExit?: {
|
|
555
|
-
duration?: number;
|
|
556
|
-
before?: (datum: any) => AnimationStyle;
|
|
557
|
-
};
|
|
558
|
-
onEnter?: {
|
|
559
|
-
duration?: number;
|
|
560
|
-
before?: (datum: any) => AnimationStyle;
|
|
561
|
-
after?: (datum: any) => AnimationStyle;
|
|
562
|
-
};
|
|
563
|
-
onLoad?: {
|
|
564
|
-
duration?: number;
|
|
565
|
-
before?: (datum: any) => AnimationStyle;
|
|
566
|
-
after?: (datum: any) => AnimationStyle;
|
|
567
|
-
};
|
|
568
|
-
easing?: AnimationEasing;
|
|
569
|
-
animationWhitelist?: string[];
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
export interface EventCallbackInterface<TTarget, TEventKey> {
|
|
573
|
-
childName?: string | string[];
|
|
574
|
-
target?: TTarget;
|
|
575
|
-
eventKey?: TEventKey;
|
|
576
|
-
mutation: (props: any) => any;
|
|
577
|
-
callback?: (props: any) => any;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
export interface EventPropTypeInterface<TTarget, TEventKey> {
|
|
581
|
-
childName?: string | Array<StringOrNumberOrCallback>;
|
|
582
|
-
target: TTarget;
|
|
583
|
-
eventKey?: TEventKey;
|
|
584
|
-
eventHandlers: {
|
|
585
|
-
[key: string]:
|
|
586
|
-
| {
|
|
587
|
-
(
|
|
588
|
-
event: React.SyntheticEvent<any>,
|
|
589
|
-
props?: any
|
|
590
|
-
): EventCallbackInterface<TTarget, TEventKey>;
|
|
591
|
-
}
|
|
592
|
-
| {
|
|
593
|
-
(
|
|
594
|
-
event: React.SyntheticEvent<any>,
|
|
595
|
-
props?: any
|
|
596
|
-
): EventCallbackInterface<TTarget, TEventKey>[];
|
|
597
|
-
}
|
|
598
|
-
| {
|
|
599
|
-
(event: React.SyntheticEvent<any>, props?: any): void;
|
|
600
|
-
};
|
|
601
|
-
};
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
export type DomainTuple = [number, number] | [Date, Date];
|
|
605
|
-
export type DomainPropObjectType =
|
|
606
|
-
| { x?: DomainTuple; y: DomainTuple }
|
|
607
|
-
| { x: DomainTuple; y?: DomainTuple };
|
|
608
|
-
export type DomainPropType = DomainPropObjectType | DomainTuple;
|
|
609
|
-
|
|
610
|
-
export type PaddingType = number | [number, number];
|
|
611
|
-
export type DomainPaddingPropType =
|
|
612
|
-
| PaddingType
|
|
613
|
-
| {
|
|
614
|
-
x?: PaddingType;
|
|
615
|
-
y?: PaddingType;
|
|
616
|
-
};
|
|
617
|
-
|
|
618
|
-
export type RangeTuple = [number, number];
|
|
619
|
-
export type RangePropType = RangeTuple | { x?: RangeTuple; y?: RangeTuple };
|
|
620
|
-
|
|
621
|
-
/**
|
|
622
|
-
* D3 scale function shape. Don"t want to introduce typing dependency to d3
|
|
623
|
-
*/
|
|
624
|
-
export interface D3Scale {
|
|
625
|
-
(input: string | number): number;
|
|
626
|
-
domain: () => any;
|
|
627
|
-
range: () => any;
|
|
628
|
-
copy: () => any;
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
export type ScalePropType = "linear" | "time" | "log" | "sqrt";
|
|
632
|
-
|
|
633
|
-
export type CategoryPropType =
|
|
634
|
-
| string[]
|
|
635
|
-
| { x: string[] }
|
|
636
|
-
| { y: string[] }
|
|
637
|
-
| {
|
|
638
|
-
x: string[];
|
|
639
|
-
y: string[];
|
|
640
|
-
};
|
|
641
|
-
|
|
642
|
-
export type DataGetterPropType =
|
|
643
|
-
| number
|
|
644
|
-
| string
|
|
645
|
-
| string[]
|
|
646
|
-
| { (data: any): number | string | string[] }
|
|
647
|
-
| Function;
|
|
648
|
-
|
|
649
|
-
export type InterpolationPropType =
|
|
650
|
-
| "basis"
|
|
651
|
-
| "basisClosed"
|
|
652
|
-
| "basisOpen"
|
|
653
|
-
| "bundle"
|
|
654
|
-
| "cardinal"
|
|
655
|
-
| "cardinalClosed"
|
|
656
|
-
| "cardinalOpen"
|
|
657
|
-
| "catmullRom"
|
|
658
|
-
| "catmullRomClosed"
|
|
659
|
-
| "catmullRomOpen"
|
|
660
|
-
| "linear"
|
|
661
|
-
| "linearClosed"
|
|
662
|
-
| "monotoneX"
|
|
663
|
-
| "monotoneY"
|
|
664
|
-
| "natural"
|
|
665
|
-
| "radial"
|
|
666
|
-
| "step"
|
|
667
|
-
| "stepAfter"
|
|
668
|
-
| "stepBefore";
|
|
669
|
-
|
|
670
|
-
export type ColorScalePropType =
|
|
671
|
-
| "grayscale"
|
|
672
|
-
| "qualitative"
|
|
673
|
-
| "heatmap"
|
|
674
|
-
| "warm"
|
|
675
|
-
| "cool"
|
|
676
|
-
| "red"
|
|
677
|
-
| "green"
|
|
678
|
-
| "blue"
|
|
679
|
-
| string[];
|
|
680
|
-
|
|
681
|
-
export type SortOrderPropType = "ascending" | "descending";
|
|
682
|
-
|
|
683
|
-
export type SVGCoordinateType = { x: number; y: number };
|
|
684
|
-
|
|
685
|
-
export interface VictoryCommonThemeProps {
|
|
686
|
-
animate?: boolean | AnimatePropTypeInterface;
|
|
687
|
-
colorScale?: ColorScalePropType;
|
|
688
|
-
containerComponent?: React.ReactElement;
|
|
689
|
-
domainPadding?: DomainPaddingPropType;
|
|
690
|
-
externalEventMutations?: EventCallbackInterface<
|
|
691
|
-
string | string[],
|
|
692
|
-
StringOrNumberOrList
|
|
693
|
-
>[];
|
|
694
|
-
groupComponent?: React.ReactElement;
|
|
695
|
-
height?: number;
|
|
696
|
-
horizontal?: boolean;
|
|
697
|
-
maxDomain?: number | { x?: number; y?: number };
|
|
698
|
-
minDomain?: number | { x?: number; y?: number };
|
|
699
|
-
name?: string;
|
|
700
|
-
origin?: OriginType;
|
|
701
|
-
padding?: PaddingProps;
|
|
702
|
-
polar?: boolean;
|
|
703
|
-
range?: RangePropType;
|
|
704
|
-
scale?:
|
|
705
|
-
| ScalePropType
|
|
706
|
-
| D3Scale
|
|
707
|
-
| {
|
|
708
|
-
x?: ScalePropType | D3Scale;
|
|
709
|
-
y?: ScalePropType | D3Scale;
|
|
710
|
-
};
|
|
711
|
-
sharedEvents?: { events: any[]; getEventState: Function };
|
|
712
|
-
singleQuadrantDomainPadding?: boolean | { x?: boolean; y?: boolean };
|
|
713
|
-
standalone?: boolean;
|
|
714
|
-
width?: number;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
export interface VictoryCommonProps extends VictoryCommonThemeProps {
|
|
718
|
-
theme?: VictoryThemeDefinition;
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
export interface VictoryCommonPrimitiveProps {
|
|
722
|
-
active?: boolean;
|
|
723
|
-
ariaLabel?: StringOrCallback;
|
|
724
|
-
className?: string;
|
|
725
|
-
clipPath?: string;
|
|
726
|
-
data?: any;
|
|
727
|
-
desc?: string | Function;
|
|
728
|
-
disableInlineStyles?: boolean;
|
|
729
|
-
events?: object;
|
|
730
|
-
id?: number | string | Function;
|
|
731
|
-
index?: number | string;
|
|
732
|
-
origin?: OriginType;
|
|
733
|
-
polar?: boolean;
|
|
734
|
-
role?: string;
|
|
735
|
-
scale?: any;
|
|
736
|
-
shapeRendering?: string;
|
|
737
|
-
style?: any;
|
|
738
|
-
tabIndex?: NumberOrCallback;
|
|
739
|
-
transform?: string;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
export interface VictoryDatableProps {
|
|
743
|
-
categories?: CategoryPropType;
|
|
744
|
-
data?: any[];
|
|
745
|
-
dataComponent?: React.ReactElement;
|
|
746
|
-
domain?: DomainPropType;
|
|
747
|
-
domainPadding?: DomainPaddingPropType;
|
|
748
|
-
samples?: number;
|
|
749
|
-
sortKey?: DataGetterPropType;
|
|
750
|
-
sortOrder?: SortOrderPropType;
|
|
751
|
-
x?: DataGetterPropType;
|
|
752
|
-
y?: DataGetterPropType;
|
|
753
|
-
y0?: DataGetterPropType;
|
|
754
|
-
}
|
|
755
|
-
|
|
756
|
-
export interface VictoryLabelableProps {
|
|
757
|
-
labelComponent?: React.ReactElement;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
export interface VictoryMultiLabelableProps extends VictoryLabelableProps {
|
|
761
|
-
labels?:
|
|
762
|
-
| string[]
|
|
763
|
-
| number[]
|
|
764
|
-
| { (data: any): string | string[] | number | number[] | null };
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
export interface VictorySingleLabelableProps extends VictoryLabelableProps {
|
|
768
|
-
label?: string | { (data: any): string | number | null };
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
export namespace Selection {
|
|
772
|
-
export function getParentSVG(evt: React.SyntheticEvent): string;
|
|
773
|
-
export function getSVGEventCoordinates(
|
|
774
|
-
evt: React.SyntheticEvent,
|
|
775
|
-
svg?: SVGElement
|
|
776
|
-
): SVGCoordinateType;
|
|
777
|
-
export function getDomainCoordinates(
|
|
778
|
-
props: any,
|
|
779
|
-
domain?: DomainPropType
|
|
780
|
-
): DomainPropType;
|
|
781
|
-
export function getDataCoordinates(
|
|
782
|
-
props: any,
|
|
783
|
-
scale: ScalePropType,
|
|
784
|
-
x: number,
|
|
785
|
-
y: number
|
|
786
|
-
): SVGCoordinateType;
|
|
787
|
-
export function getBounds(props: any): SVGCoordinateType;
|
|
788
|
-
}
|
|
789
|
-
|
|
790
|
-
export interface TextSizeStyleInterface {
|
|
791
|
-
angle?: number;
|
|
792
|
-
characterConstant?: string;
|
|
793
|
-
fontFamily?: string;
|
|
794
|
-
fontSize?: number | string;
|
|
795
|
-
letterSpacing?: string;
|
|
796
|
-
lineHeight?: number;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
export namespace TextSize {
|
|
800
|
-
export function approximateTextSize(
|
|
801
|
-
text: string,
|
|
802
|
-
style?: TextSizeStyleInterface
|
|
803
|
-
): { width: number; height: number };
|
|
804
|
-
export function convertLengthToPixels(
|
|
805
|
-
length: string,
|
|
806
|
-
fontSize: number
|
|
807
|
-
): number;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
// #endregion
|
|
811
|
-
|
|
812
|
-
// #region Victory Portal
|
|
813
|
-
|
|
814
|
-
export interface PortalProps {
|
|
815
|
-
className?: string;
|
|
816
|
-
height: number;
|
|
817
|
-
style?: React.CSSProperties;
|
|
818
|
-
viewBox?: string;
|
|
819
|
-
width: number;
|
|
820
|
-
}
|
|
821
|
-
|
|
822
|
-
export class Portal extends React.Component<PortalProps, any> {}
|
|
823
|
-
|
|
824
|
-
export interface VictoryPortalProps {
|
|
825
|
-
children?: React.ReactElement;
|
|
826
|
-
groupComponent?: React.ReactElement;
|
|
827
|
-
}
|
|
828
|
-
|
|
829
|
-
export class VictoryPortal extends React.Component<VictoryPortalProps, any> {}
|
|
830
|
-
|
|
831
|
-
// #endregion
|
|
832
|
-
|
|
833
|
-
// #region Victory Primitives
|
|
834
|
-
export interface ArcProps extends VictoryCommonPrimitiveProps {
|
|
835
|
-
closedPath?: boolean;
|
|
836
|
-
cx?: number;
|
|
837
|
-
cy?: number;
|
|
838
|
-
datum?: any;
|
|
839
|
-
endAngle?: number;
|
|
840
|
-
pathComponent?: React.ReactElement;
|
|
841
|
-
r?: number;
|
|
842
|
-
startAngle?: number;
|
|
843
|
-
}
|
|
844
|
-
|
|
845
|
-
export class Arc extends React.Component<ArcProps> {}
|
|
846
|
-
|
|
847
|
-
export interface BackgroundProps extends VictoryCommonPrimitiveProps {
|
|
848
|
-
circleComponent?: React.ReactElement;
|
|
849
|
-
height?: number;
|
|
850
|
-
rectComponent?: React.ReactElement;
|
|
851
|
-
rx?: number;
|
|
852
|
-
ry?: number;
|
|
853
|
-
width?: number;
|
|
854
|
-
x?: number;
|
|
855
|
-
y?: number;
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
export class Background extends React.Component<BackgroundProps> {}
|
|
859
|
-
|
|
860
|
-
export interface BorderProps extends VictoryCommonPrimitiveProps {
|
|
861
|
-
width?: number;
|
|
862
|
-
height?: number;
|
|
863
|
-
rectComponent?: React.ReactElement;
|
|
864
|
-
x?: number;
|
|
865
|
-
y?: number;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
export class Border extends React.Component<BorderProps> {}
|
|
869
|
-
|
|
870
|
-
export interface ClipPathProps extends VictoryCommonPrimitiveProps {
|
|
871
|
-
children?: React.ReactNode[] | React.ReactNode;
|
|
872
|
-
clipId?: number | string;
|
|
873
|
-
}
|
|
874
|
-
|
|
875
|
-
export class ClipPath extends React.Component<ClipPathProps> {}
|
|
876
|
-
|
|
877
|
-
export interface LineSegmentProps extends VictoryCommonPrimitiveProps {
|
|
878
|
-
datum?: any;
|
|
879
|
-
lineComponent?: React.ReactElement;
|
|
880
|
-
x1?: number;
|
|
881
|
-
x2?: number;
|
|
882
|
-
y1?: number;
|
|
883
|
-
y2?: number;
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
export class LineSegment extends React.Component<LineSegmentProps> {}
|
|
887
|
-
|
|
888
|
-
export interface PointProps extends VictoryCommonPrimitiveProps {
|
|
889
|
-
datum?: any;
|
|
890
|
-
getPath?: (x: number, y: number, size: number) => string;
|
|
891
|
-
pathComponent?: React.ReactElement;
|
|
892
|
-
size?: number | Function;
|
|
893
|
-
symbol?: ScatterSymbolType | Function;
|
|
894
|
-
x?: number;
|
|
895
|
-
y?: number;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
-
export class Point extends React.Component<PointProps> {}
|
|
899
|
-
|
|
900
|
-
export interface TextProps extends VictoryCommonPrimitiveProps {
|
|
901
|
-
children?: React.ReactNode;
|
|
902
|
-
desc?: string;
|
|
903
|
-
title?: string;
|
|
904
|
-
}
|
|
905
|
-
|
|
906
|
-
export class Text extends React.Component<TextProps> {}
|
|
907
|
-
|
|
908
|
-
export type WhiskerAxes = {
|
|
909
|
-
x1?: number;
|
|
910
|
-
x2?: number;
|
|
911
|
-
y1?: number;
|
|
912
|
-
y2?: number;
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
export interface WhiskerProps extends VictoryCommonPrimitiveProps {
|
|
916
|
-
groupComponent?: React.ReactElement;
|
|
917
|
-
lineComponent?: React.ReactElement;
|
|
918
|
-
majorWhisker?: WhiskerAxes;
|
|
919
|
-
minorWhisker?: WhiskerAxes;
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
export class Whisker extends React.Component<WhiskerProps> {}
|
|
923
|
-
|
|
924
|
-
export interface VictoryPrimitiveShapeProps
|
|
925
|
-
extends VictoryCommonPrimitiveProps {
|
|
926
|
-
desc?: string;
|
|
927
|
-
rx?: number;
|
|
928
|
-
ry?: number;
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
export class Circle extends React.Component<VictoryPrimitiveShapeProps> {}
|
|
932
|
-
|
|
933
|
-
export class Line extends React.Component<VictoryPrimitiveShapeProps> {}
|
|
934
|
-
|
|
935
|
-
export class Path extends React.Component<VictoryPrimitiveShapeProps> {}
|
|
936
|
-
|
|
937
|
-
export class Rect extends React.Component<VictoryPrimitiveShapeProps> {}
|
|
938
|
-
|
|
939
|
-
export class TSpan extends React.Component<VictoryCommonPrimitiveProps> {}
|
|
940
|
-
|
|
941
|
-
// #endregion
|
|
1
|
+
export * from "./victory-accessible-group/victory-accessible-group";
|
|
2
|
+
export * from "./victory-animation/victory-animation";
|
|
3
|
+
export * from "./victory-container/victory-container";
|
|
4
|
+
export * from "./victory-label/victory-label";
|
|
5
|
+
export * from "./victory-transition/victory-transition";
|
|
6
|
+
export * from "./victory-clip-container/victory-clip-container";
|
|
7
|
+
export * from "./victory-theme/victory-theme";
|
|
8
|
+
export * from "./victory-portal/portal";
|
|
9
|
+
export * from "./victory-portal/portal-context";
|
|
10
|
+
export * from "./victory-portal/victory-portal";
|
|
11
|
+
export * from "./victory-primitives";
|
|
12
|
+
export { Border as Box } from "./victory-primitives";
|
|
13
|
+
export { default as addEvents } from "./victory-util/add-events";
|
|
14
|
+
export * as Collection from "./victory-util/collection";
|
|
15
|
+
export * as Data from "./victory-util/data";
|
|
16
|
+
export * as DefaultTransitions from "./victory-util/default-transitions";
|
|
17
|
+
export * as Domain from "./victory-util/domain";
|
|
18
|
+
export * as Events from "./victory-util/events";
|
|
19
|
+
export * as Helpers from "./victory-util/helpers";
|
|
20
|
+
export * as Immutable from "./victory-util/immutable";
|
|
21
|
+
export * as LabelHelpers from "./victory-util/label-helpers";
|
|
22
|
+
export * as Log from "./victory-util/log";
|
|
23
|
+
export * as PropTypes from "./victory-util/prop-types";
|
|
24
|
+
export * as Scale from "./victory-util/scale";
|
|
25
|
+
export * as Selection from "./victory-util/selection";
|
|
26
|
+
export * as Style from "./victory-util/style";
|
|
27
|
+
export * as TextSize from "./victory-util/textsize";
|
|
28
|
+
export * as Transitions from "./victory-util/transitions";
|
|
29
|
+
export * as UserProps from "./victory-util/user-props";
|
|
30
|
+
export * as CommonProps from "./victory-util/common-props";
|
|
31
|
+
export * as Wrapper from "./victory-util/wrapper";
|
|
32
|
+
export * as Axis from "./victory-util/axis";
|
|
33
|
+
export * as Hooks from "./victory-util/hooks";
|
|
34
|
+
export * as LineHelpers from "./victory-util/line-helpers";
|
|
35
|
+
export { default as Timer } from "./victory-util/timer";
|
|
36
|
+
export * as PointPathHelpers from "./victory-util/point-path-helpers";
|
|
37
|
+
export { default as TimerContext } from "./victory-util/timer-context";
|
|
38
|
+
export * from "./victory-util/types";
|