victory-core 36.9.2-next.3 → 37.0.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/CHANGELOG.md +28 -10
- package/README.md +1 -1
- package/dist/victory-core.js +4449 -6196
- package/dist/victory-core.min.js +1 -1
- package/es/index.d.ts +17 -17
- package/es/types/callbacks.d.ts +36 -36
- package/es/types/prop-types.d.ts +129 -129
- package/es/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/es/victory-accessible-group/victory-accessible-group.js +9 -15
- package/es/victory-animation/util.d.ts +66 -66
- package/es/victory-animation/util.js +28 -47
- package/es/victory-animation/victory-animation.d.ts +34 -34
- package/es/victory-animation/victory-animation.js +51 -67
- package/es/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/es/victory-clip-container/victory-clip-container.js +153 -229
- package/es/victory-container/victory-container.d.ts +68 -68
- package/es/victory-container/victory-container.js +157 -216
- package/es/victory-label/victory-label.d.ts +58 -58
- package/es/victory-label/victory-label.js +246 -323
- package/es/victory-portal/portal-context.d.ts +11 -11
- package/es/victory-portal/portal-context.js +1 -2
- package/es/victory-portal/portal.d.ts +20 -20
- package/es/victory-portal/portal.js +30 -76
- package/es/victory-portal/victory-portal.d.ts +26 -26
- package/es/victory-portal/victory-portal.js +47 -104
- package/es/victory-primitives/arc.d.ts +14 -14
- package/es/victory-primitives/arc.js +44 -47
- package/es/victory-primitives/background.d.ts +13 -13
- package/es/victory-primitives/background.js +14 -17
- package/es/victory-primitives/border.d.ts +10 -10
- package/es/victory-primitives/border.js +20 -24
- package/es/victory-primitives/circle.d.ts +3 -3
- package/es/victory-primitives/circle.js +13 -27
- package/es/victory-primitives/clip-path.d.ts +7 -7
- package/es/victory-primitives/clip-path.js +3 -7
- package/es/victory-primitives/index.d.ts +14 -14
- package/es/victory-primitives/line-segment.d.ts +11 -11
- package/es/victory-primitives/line-segment.js +20 -24
- package/es/victory-primitives/line.d.ts +3 -3
- package/es/victory-primitives/line.js +13 -27
- package/es/victory-primitives/path.d.ts +3 -3
- package/es/victory-primitives/path.js +13 -27
- package/es/victory-primitives/point.d.ts +13 -13
- package/es/victory-primitives/point.js +36 -40
- package/es/victory-primitives/rect.d.ts +3 -3
- package/es/victory-primitives/rect.js +13 -27
- package/es/victory-primitives/text.d.ts +8 -8
- package/es/victory-primitives/text.js +15 -28
- package/es/victory-primitives/tspan.d.ts +3 -3
- package/es/victory-primitives/tspan.js +13 -26
- package/es/victory-primitives/types.d.ts +7 -7
- package/es/victory-primitives/whisker.d.ts +15 -15
- package/es/victory-primitives/whisker.js +43 -47
- package/es/victory-theme/grayscale.d.ts +2 -2
- package/es/victory-theme/grayscale.js +22 -22
- package/es/victory-theme/material.d.ts +2 -2
- package/es/victory-theme/material.js +46 -46
- package/es/victory-theme/types.d.ts +238 -238
- package/es/victory-theme/victory-theme.d.ts +5 -5
- package/es/victory-theme/victory-theme.js +3 -3
- package/es/victory-transition/victory-transition.d.ts +53 -53
- package/es/victory-transition/victory-transition.js +126 -206
- package/es/victory-util/add-events.d.ts +126 -126
- package/es/victory-util/add-events.js +265 -380
- package/es/victory-util/axis.d.ts +50 -50
- package/es/victory-util/axis.js +133 -222
- package/es/victory-util/collection.d.ts +15 -8
- package/es/victory-util/collection.js +24 -36
- package/es/victory-util/common-props.d.ts +79 -79
- package/es/victory-util/data.d.ts +74 -74
- package/es/victory-util/data.js +159 -214
- package/es/victory-util/default-transitions.d.ts +4 -4
- package/es/victory-util/default-transitions.js +33 -51
- package/es/victory-util/domain.d.ts +90 -90
- package/es/victory-util/domain.js +122 -171
- package/es/victory-util/events.d.ts +64 -64
- package/es/victory-util/events.js +168 -258
- package/es/victory-util/helpers.d.ts +96 -91
- package/es/victory-util/helpers.js +162 -176
- package/es/victory-util/hooks/index.d.ts +2 -2
- package/es/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/es/victory-util/hooks/use-animation-state.js +61 -99
- package/es/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/es/victory-util/hooks/use-previous-props.js +2 -2
- package/es/victory-util/immutable.d.ts +11 -11
- package/es/victory-util/immutable.js +6 -8
- package/es/victory-util/index.d.ts +26 -26
- package/es/victory-util/label-helpers.d.ts +26 -26
- package/es/victory-util/label-helpers.js +128 -130
- package/es/victory-util/line-helpers.d.ts +4 -4
- package/es/victory-util/line-helpers.js +29 -41
- package/es/victory-util/log.d.ts +1 -1
- package/es/victory-util/log.js +1 -1
- package/es/victory-util/point-path-helpers.d.ts +9 -9
- package/es/victory-util/point-path-helpers.js +89 -49
- package/es/victory-util/scale.d.ts +9 -9
- package/es/victory-util/scale.js +24 -42
- package/es/victory-util/selection.d.ts +28 -28
- package/es/victory-util/selection.js +39 -40
- package/es/victory-util/style.d.ts +18 -18
- package/es/victory-util/style.js +8 -13
- package/es/victory-util/textsize.d.ts +35 -35
- package/es/victory-util/textsize.js +80 -154
- package/es/victory-util/timer-context.d.ts +11 -11
- package/es/victory-util/timer-context.js +2 -2
- package/es/victory-util/timer.d.ts +16 -16
- package/es/victory-util/timer.js +40 -76
- package/es/victory-util/transitions.d.ts +48 -48
- package/es/victory-util/transitions.js +110 -150
- package/es/victory-util/type-helpers.d.ts +9 -9
- package/es/victory-util/type-helpers.js +2 -3
- package/es/victory-util/user-props.d.ts +26 -26
- package/es/victory-util/user-props.js +24 -49
- package/es/victory-util/wrapper.d.ts +33 -37
- package/es/victory-util/wrapper.js +182 -245
- package/lib/index.d.ts +17 -17
- package/lib/index.js +0 -30
- package/lib/types/callbacks.d.ts +36 -36
- package/lib/types/prop-types.d.ts +129 -129
- package/lib/victory-accessible-group/victory-accessible-group.d.ts +10 -10
- package/lib/victory-accessible-group/victory-accessible-group.js +9 -19
- package/lib/victory-animation/util.d.ts +66 -66
- package/lib/victory-animation/util.js +28 -63
- package/lib/victory-animation/victory-animation.d.ts +34 -34
- package/lib/victory-animation/victory-animation.js +54 -83
- package/lib/victory-clip-container/victory-clip-container.d.ts +46 -46
- package/lib/victory-clip-container/victory-clip-container.js +156 -243
- package/lib/victory-container/victory-container.d.ts +68 -68
- package/lib/victory-container/victory-container.js +160 -232
- package/lib/victory-label/victory-label.d.ts +58 -58
- package/lib/victory-label/victory-label.js +248 -344
- package/lib/victory-portal/portal-context.d.ts +11 -11
- package/lib/victory-portal/portal-context.js +1 -6
- package/lib/victory-portal/portal.d.ts +20 -20
- package/lib/victory-portal/portal.js +31 -81
- package/lib/victory-portal/victory-portal.d.ts +26 -26
- package/lib/victory-portal/victory-portal.js +50 -116
- package/lib/victory-primitives/arc.d.ts +14 -14
- package/lib/victory-primitives/arc.js +48 -57
- package/lib/victory-primitives/background.d.ts +13 -13
- package/lib/victory-primitives/background.js +16 -28
- package/lib/victory-primitives/border.d.ts +10 -10
- package/lib/victory-primitives/border.js +22 -34
- package/lib/victory-primitives/circle.d.ts +3 -3
- package/lib/victory-primitives/circle.js +16 -36
- package/lib/victory-primitives/clip-path.d.ts +7 -7
- package/lib/victory-primitives/clip-path.js +3 -11
- package/lib/victory-primitives/index.d.ts +14 -14
- package/lib/victory-primitives/index.js +0 -28
- package/lib/victory-primitives/line-segment.d.ts +11 -11
- package/lib/victory-primitives/line-segment.js +22 -34
- package/lib/victory-primitives/line.d.ts +3 -3
- package/lib/victory-primitives/line.js +16 -36
- package/lib/victory-primitives/path.d.ts +3 -3
- package/lib/victory-primitives/path.js +16 -36
- package/lib/victory-primitives/point.d.ts +13 -13
- package/lib/victory-primitives/point.js +38 -52
- package/lib/victory-primitives/rect.d.ts +3 -3
- package/lib/victory-primitives/rect.js +16 -36
- package/lib/victory-primitives/text.d.ts +8 -8
- package/lib/victory-primitives/text.js +15 -33
- package/lib/victory-primitives/tspan.d.ts +3 -3
- package/lib/victory-primitives/tspan.js +13 -31
- package/lib/victory-primitives/types.d.ts +7 -7
- package/lib/victory-primitives/whisker.d.ts +15 -15
- package/lib/victory-primitives/whisker.js +45 -57
- package/lib/victory-theme/grayscale.d.ts +2 -2
- package/lib/victory-theme/grayscale.js +23 -24
- package/lib/victory-theme/material.d.ts +2 -2
- package/lib/victory-theme/material.js +47 -48
- package/lib/victory-theme/types.d.ts +238 -238
- package/lib/victory-theme/victory-theme.d.ts +5 -5
- package/lib/victory-theme/victory-theme.js +2 -7
- package/lib/victory-transition/victory-transition.d.ts +53 -53
- package/lib/victory-transition/victory-transition.js +129 -224
- package/lib/victory-util/add-events.d.ts +126 -126
- package/lib/victory-util/add-events.js +265 -382
- package/lib/victory-util/axis.d.ts +50 -50
- package/lib/victory-util/axis.js +135 -242
- package/lib/victory-util/collection.d.ts +15 -8
- package/lib/victory-util/collection.js +24 -43
- package/lib/victory-util/common-props.d.ts +79 -79
- package/lib/victory-util/data.d.ts +74 -74
- package/lib/victory-util/data.js +160 -239
- package/lib/victory-util/default-transitions.d.ts +4 -4
- package/lib/victory-util/default-transitions.js +33 -54
- package/lib/victory-util/domain.d.ts +90 -90
- package/lib/victory-util/domain.js +123 -193
- package/lib/victory-util/events.d.ts +64 -64
- package/lib/victory-util/events.js +167 -274
- package/lib/victory-util/helpers.d.ts +96 -91
- package/lib/victory-util/helpers.js +166 -204
- package/lib/victory-util/hooks/index.d.ts +2 -2
- package/lib/victory-util/hooks/index.js +0 -2
- package/lib/victory-util/hooks/use-animation-state.d.ts +21 -21
- package/lib/victory-util/hooks/use-animation-state.js +63 -113
- package/lib/victory-util/hooks/use-previous-props.d.ts +1 -1
- package/lib/victory-util/hooks/use-previous-props.js +2 -7
- package/lib/victory-util/immutable.d.ts +11 -11
- package/lib/victory-util/immutable.js +6 -18
- package/lib/victory-util/index.d.ts +26 -26
- package/lib/victory-util/index.js +2 -51
- package/lib/victory-util/label-helpers.d.ts +26 -26
- package/lib/victory-util/label-helpers.js +130 -141
- package/lib/victory-util/line-helpers.d.ts +4 -4
- package/lib/victory-util/line-helpers.js +31 -49
- package/lib/victory-util/log.d.ts +1 -1
- package/lib/victory-util/log.js +1 -2
- package/lib/victory-util/point-path-helpers.d.ts +9 -9
- package/lib/victory-util/point-path-helpers.js +91 -63
- package/lib/victory-util/scale.d.ts +9 -9
- package/lib/victory-util/scale.js +26 -57
- package/lib/victory-util/selection.d.ts +28 -28
- package/lib/victory-util/selection.js +41 -49
- package/lib/victory-util/style.d.ts +18 -18
- package/lib/victory-util/style.js +8 -16
- package/lib/victory-util/textsize.d.ts +35 -35
- package/lib/victory-util/textsize.js +80 -157
- package/lib/victory-util/timer-context.d.ts +11 -11
- package/lib/victory-util/timer-context.js +2 -8
- package/lib/victory-util/timer.d.ts +16 -16
- package/lib/victory-util/timer.js +40 -76
- package/lib/victory-util/transitions.d.ts +48 -48
- package/lib/victory-util/transitions.js +110 -152
- package/lib/victory-util/type-helpers.d.ts +9 -9
- package/lib/victory-util/type-helpers.js +2 -9
- package/lib/victory-util/user-props.d.ts +26 -26
- package/lib/victory-util/user-props.js +25 -59
- package/lib/victory-util/wrapper.d.ts +33 -37
- package/lib/victory-util/wrapper.js +184 -279
- package/package.json +6 -3
- package/src/types/prop-types.ts +0 -7
- package/src/victory-container/victory-container.tsx +195 -171
- package/src/victory-portal/portal-context.ts +4 -5
- package/src/victory-portal/portal.tsx +42 -5
- package/src/victory-portal/victory-portal.tsx +71 -34
- package/src/victory-util/add-events.tsx +6 -4
- package/src/victory-util/axis.tsx +12 -3
- package/src/victory-util/collection.tsx +13 -0
- package/src/victory-util/helpers.ts +11 -0
- package/src/victory-util/index.ts +0 -1
- package/src/victory-util/wrapper.tsx +1 -0
- package/src/victory-util/merge-refs.ts +0 -13
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.continuousPolarTransitions = continuousPolarTransitions;
|
|
7
7
|
exports.continuousTransitions = continuousTransitions;
|
|
8
8
|
exports.discreteTransitions = discreteTransitions;
|
|
9
|
-
|
|
10
9
|
function continuousTransitions() {
|
|
11
10
|
return {
|
|
12
11
|
onLoad: {
|
|
@@ -20,34 +19,28 @@ function continuousTransitions() {
|
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
function continuousPolarTransitions() {
|
|
25
23
|
return {
|
|
26
24
|
onLoad: {
|
|
27
25
|
duration: 2000,
|
|
28
|
-
before:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
_y1: datum._y1,
|
|
39
|
-
_y0: datum._y0
|
|
40
|
-
};
|
|
41
|
-
}
|
|
26
|
+
before: () => ({
|
|
27
|
+
_y: 0,
|
|
28
|
+
_y1: 0,
|
|
29
|
+
_y0: 0
|
|
30
|
+
}),
|
|
31
|
+
after: datum => ({
|
|
32
|
+
_y: datum._y,
|
|
33
|
+
_y1: datum._y1,
|
|
34
|
+
_y0: datum._y0
|
|
35
|
+
})
|
|
42
36
|
},
|
|
43
37
|
onExit: {
|
|
44
38
|
duration: 500,
|
|
45
|
-
before:
|
|
46
|
-
|
|
47
|
-
|
|
39
|
+
before: (datum, index, data) => {
|
|
40
|
+
const adjacent = attr => {
|
|
41
|
+
const adj = index === 0 ? data[index + 1] : data[index - 1];
|
|
48
42
|
return adj[attr];
|
|
49
43
|
};
|
|
50
|
-
|
|
51
44
|
return {
|
|
52
45
|
_x: adjacent("_x"),
|
|
53
46
|
_y: adjacent("_y"),
|
|
@@ -57,61 +50,47 @@ function continuousPolarTransitions() {
|
|
|
57
50
|
},
|
|
58
51
|
onEnter: {
|
|
59
52
|
duration: 500,
|
|
60
|
-
before:
|
|
61
|
-
|
|
62
|
-
|
|
53
|
+
before: (datum, index, data) => {
|
|
54
|
+
const adjacent = attr => {
|
|
55
|
+
const adj = index === 0 ? data[index + 1] : data[index - 1];
|
|
63
56
|
return adj[attr];
|
|
64
57
|
};
|
|
65
|
-
|
|
66
58
|
return {
|
|
67
59
|
_x: adjacent("_x"),
|
|
68
60
|
_y: adjacent("_y"),
|
|
69
61
|
_y0: adjacent("_y0")
|
|
70
62
|
};
|
|
71
63
|
},
|
|
72
|
-
after:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
};
|
|
79
|
-
}
|
|
64
|
+
after: datum => ({
|
|
65
|
+
_x: datum._x,
|
|
66
|
+
_y: datum._y,
|
|
67
|
+
_y1: datum._y1,
|
|
68
|
+
_y0: datum._y0
|
|
69
|
+
})
|
|
80
70
|
}
|
|
81
71
|
};
|
|
82
72
|
}
|
|
83
|
-
|
|
84
73
|
function discreteTransitions() {
|
|
85
74
|
return {
|
|
86
75
|
onLoad: {
|
|
87
76
|
duration: 2000,
|
|
88
|
-
before:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
},
|
|
93
|
-
after: function (datum) {
|
|
94
|
-
return datum;
|
|
95
|
-
}
|
|
77
|
+
before: () => ({
|
|
78
|
+
opacity: 0
|
|
79
|
+
}),
|
|
80
|
+
after: datum => datum
|
|
96
81
|
},
|
|
97
82
|
onExit: {
|
|
98
83
|
duration: 600,
|
|
99
|
-
before:
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
};
|
|
103
|
-
}
|
|
84
|
+
before: () => ({
|
|
85
|
+
opacity: 0
|
|
86
|
+
})
|
|
104
87
|
},
|
|
105
88
|
onEnter: {
|
|
106
89
|
duration: 600,
|
|
107
|
-
before:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
},
|
|
112
|
-
after: function (datum) {
|
|
113
|
-
return datum;
|
|
114
|
-
}
|
|
90
|
+
before: () => ({
|
|
91
|
+
opacity: 0
|
|
92
|
+
}),
|
|
93
|
+
after: datum => datum
|
|
115
94
|
}
|
|
116
95
|
};
|
|
117
96
|
}
|
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns a getDomain function
|
|
3
|
-
* @param {Function} getDomainFromDataFunction: a function that takes props and axis and
|
|
4
|
-
* returns a domain based on data
|
|
5
|
-
* @param {Function} formatDomainFunction: a function that takes domain, props, and axis and
|
|
6
|
-
* returns a formatted domain
|
|
7
|
-
* @returns {Function} a function that takes props and axis and returns a formatted domain
|
|
8
|
-
*/
|
|
9
|
-
export declare function createDomainFunction(getDomainFromDataFunction?: any, formatDomainFunction?: any): (props: any, axis: any) => any;
|
|
10
|
-
/**
|
|
11
|
-
* Returns a formatted domain.
|
|
12
|
-
* @param {Array} domain: a domain in the form of a two element array
|
|
13
|
-
* @param {Object} props: the props object
|
|
14
|
-
* @param {String} axis: the current axis
|
|
15
|
-
* @returns {Array} a domain in the form of a two element array
|
|
16
|
-
*/
|
|
17
|
-
export declare function formatDomain(domain: any, props: any, axis: any): any;
|
|
18
|
-
/**
|
|
19
|
-
* Returns a domain for a given axis based on props, category, or data
|
|
20
|
-
* @param {Object} props: the props object
|
|
21
|
-
* @param {String} axis: the current axis
|
|
22
|
-
* @returns {Array} the domain for the given axis
|
|
23
|
-
*/
|
|
24
|
-
export declare function getDomain(props: any, axis: any): any;
|
|
25
|
-
/**
|
|
26
|
-
* Returns a domain based on categories if they exist
|
|
27
|
-
* @param {Object} props: the props object
|
|
28
|
-
* @param {String} axis: the current axis
|
|
29
|
-
* @param {Array} categories: an array of categories corresponding to a given axis
|
|
30
|
-
* @returns {Array|undefined} returns a domain from categories or undefined
|
|
31
|
-
*/
|
|
32
|
-
export declare function getDomainFromCategories(props: any, axis: any, categories?: any): any[] | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* Returns a domain from a dataset for a given axis
|
|
35
|
-
* @param {Object} props: the props object
|
|
36
|
-
* @param {String} axis: the current axis
|
|
37
|
-
* @param {Array} dataset: an array of data
|
|
38
|
-
* @returns {Array} the domain based on data
|
|
39
|
-
*/
|
|
40
|
-
export declare function getDomainFromData(props: any, axis: any, dataset: any): any[] | undefined;
|
|
41
|
-
/**
|
|
42
|
-
* Returns a domain in the form of a two element array given a min and max value.
|
|
43
|
-
* @param {Number|Date} min: the props object
|
|
44
|
-
* @param {Number|Date} max: the current axis
|
|
45
|
-
* @returns {Array} the minDomain based on props
|
|
46
|
-
*/
|
|
47
|
-
export declare function getDomainFromMinMax(min: any, max: any): any[];
|
|
48
|
-
/**
|
|
49
|
-
* Returns a the domain for a given axis if domain is given in props
|
|
50
|
-
* @param {Object} props: the props object
|
|
51
|
-
* @param {String} axis: the current axis
|
|
52
|
-
* @returns {Array|undefined} the domain based on props
|
|
53
|
-
*/
|
|
54
|
-
export declare function getDomainFromProps(props: any, axis: any): any;
|
|
55
|
-
/**
|
|
56
|
-
* Returns a domain for a given axis. This method forces the domain to include
|
|
57
|
-
* zero unless the domain is explicitly specified in props.
|
|
58
|
-
* @param {Object} props: the props object
|
|
59
|
-
* @param {String} axis: the current axis
|
|
60
|
-
* @returns {Array} the domain for the given axis
|
|
61
|
-
*/
|
|
62
|
-
export declare function getDomainWithZero(props: any, axis: any): any;
|
|
63
|
-
/**
|
|
64
|
-
* Returns the maxDomain from props if it exists
|
|
65
|
-
* @param {Object} props: the props object
|
|
66
|
-
* @param {String} axis: the current axis
|
|
67
|
-
* @returns {Number|Date|undefined} the maxDomain based on props
|
|
68
|
-
*/
|
|
69
|
-
export declare function getMaxFromProps(props: any, axis: any): any;
|
|
70
|
-
/**
|
|
71
|
-
* Returns the minDomain from props if it exists
|
|
72
|
-
* @param {Object} props: the props object
|
|
73
|
-
* @param {String} axis: the current axis
|
|
74
|
-
* @returns {Number|Date|undefined} the minDomain based on props
|
|
75
|
-
*/
|
|
76
|
-
export declare function getMinFromProps(props: any, axis: any): any;
|
|
77
|
-
/**
|
|
78
|
-
* Returns a symmetrically padded domain for polar charts
|
|
79
|
-
* @param {Array} domain: the original domain
|
|
80
|
-
* @param {Array} values: a flat array of values corresponding to either tickValues, or data values
|
|
81
|
-
* for a given dimension i.e. only x values.
|
|
82
|
-
* @returns {Array} the symmetric domain
|
|
83
|
-
*/
|
|
84
|
-
export declare function getSymmetricDomain(domain: any, values: number[]): any[];
|
|
85
|
-
/**
|
|
86
|
-
* Checks whether a given component can be used to calculate domain
|
|
87
|
-
* @param {Component} component: a React component instance
|
|
88
|
-
* @returns {Boolean} Returns true if the given component has a role included in the whitelist
|
|
89
|
-
*/
|
|
90
|
-
export declare function isDomainComponent(component: any): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Returns a getDomain function
|
|
3
|
+
* @param {Function} getDomainFromDataFunction: a function that takes props and axis and
|
|
4
|
+
* returns a domain based on data
|
|
5
|
+
* @param {Function} formatDomainFunction: a function that takes domain, props, and axis and
|
|
6
|
+
* returns a formatted domain
|
|
7
|
+
* @returns {Function} a function that takes props and axis and returns a formatted domain
|
|
8
|
+
*/
|
|
9
|
+
export declare function createDomainFunction(getDomainFromDataFunction?: any, formatDomainFunction?: any): (props: any, axis: any) => any;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a formatted domain.
|
|
12
|
+
* @param {Array} domain: a domain in the form of a two element array
|
|
13
|
+
* @param {Object} props: the props object
|
|
14
|
+
* @param {String} axis: the current axis
|
|
15
|
+
* @returns {Array} a domain in the form of a two element array
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatDomain(domain: any, props: any, axis: any): any;
|
|
18
|
+
/**
|
|
19
|
+
* Returns a domain for a given axis based on props, category, or data
|
|
20
|
+
* @param {Object} props: the props object
|
|
21
|
+
* @param {String} axis: the current axis
|
|
22
|
+
* @returns {Array} the domain for the given axis
|
|
23
|
+
*/
|
|
24
|
+
export declare function getDomain(props: any, axis: any): any;
|
|
25
|
+
/**
|
|
26
|
+
* Returns a domain based on categories if they exist
|
|
27
|
+
* @param {Object} props: the props object
|
|
28
|
+
* @param {String} axis: the current axis
|
|
29
|
+
* @param {Array} categories: an array of categories corresponding to a given axis
|
|
30
|
+
* @returns {Array|undefined} returns a domain from categories or undefined
|
|
31
|
+
*/
|
|
32
|
+
export declare function getDomainFromCategories(props: any, axis: any, categories?: any): any[] | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Returns a domain from a dataset for a given axis
|
|
35
|
+
* @param {Object} props: the props object
|
|
36
|
+
* @param {String} axis: the current axis
|
|
37
|
+
* @param {Array} dataset: an array of data
|
|
38
|
+
* @returns {Array} the domain based on data
|
|
39
|
+
*/
|
|
40
|
+
export declare function getDomainFromData(props: any, axis: any, dataset: any): any[] | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a domain in the form of a two element array given a min and max value.
|
|
43
|
+
* @param {Number|Date} min: the props object
|
|
44
|
+
* @param {Number|Date} max: the current axis
|
|
45
|
+
* @returns {Array} the minDomain based on props
|
|
46
|
+
*/
|
|
47
|
+
export declare function getDomainFromMinMax(min: any, max: any): any[];
|
|
48
|
+
/**
|
|
49
|
+
* Returns a the domain for a given axis if domain is given in props
|
|
50
|
+
* @param {Object} props: the props object
|
|
51
|
+
* @param {String} axis: the current axis
|
|
52
|
+
* @returns {Array|undefined} the domain based on props
|
|
53
|
+
*/
|
|
54
|
+
export declare function getDomainFromProps(props: any, axis: any): any;
|
|
55
|
+
/**
|
|
56
|
+
* Returns a domain for a given axis. This method forces the domain to include
|
|
57
|
+
* zero unless the domain is explicitly specified in props.
|
|
58
|
+
* @param {Object} props: the props object
|
|
59
|
+
* @param {String} axis: the current axis
|
|
60
|
+
* @returns {Array} the domain for the given axis
|
|
61
|
+
*/
|
|
62
|
+
export declare function getDomainWithZero(props: any, axis: any): any;
|
|
63
|
+
/**
|
|
64
|
+
* Returns the maxDomain from props if it exists
|
|
65
|
+
* @param {Object} props: the props object
|
|
66
|
+
* @param {String} axis: the current axis
|
|
67
|
+
* @returns {Number|Date|undefined} the maxDomain based on props
|
|
68
|
+
*/
|
|
69
|
+
export declare function getMaxFromProps(props: any, axis: any): any;
|
|
70
|
+
/**
|
|
71
|
+
* Returns the minDomain from props if it exists
|
|
72
|
+
* @param {Object} props: the props object
|
|
73
|
+
* @param {String} axis: the current axis
|
|
74
|
+
* @returns {Number|Date|undefined} the minDomain based on props
|
|
75
|
+
*/
|
|
76
|
+
export declare function getMinFromProps(props: any, axis: any): any;
|
|
77
|
+
/**
|
|
78
|
+
* Returns a symmetrically padded domain for polar charts
|
|
79
|
+
* @param {Array} domain: the original domain
|
|
80
|
+
* @param {Array} values: a flat array of values corresponding to either tickValues, or data values
|
|
81
|
+
* for a given dimension i.e. only x values.
|
|
82
|
+
* @returns {Array} the symmetric domain
|
|
83
|
+
*/
|
|
84
|
+
export declare function getSymmetricDomain(domain: any, values: number[]): any[];
|
|
85
|
+
/**
|
|
86
|
+
* Checks whether a given component can be used to calculate domain
|
|
87
|
+
* @param {Component} component: a React component instance
|
|
88
|
+
* @returns {Boolean} Returns true if the given component has a role included in the whitelist
|
|
89
|
+
*/
|
|
90
|
+
export declare function isDomainComponent(component: any): boolean;
|
|
91
91
|
//# sourceMappingURL=domain.d.ts.map
|