victory-errorbar 36.9.1 → 36.9.2-next.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 +12 -0
- package/dist/victory-errorbar.js +3475 -4667
- package/dist/victory-errorbar.min.js +1 -1
- package/es/error-bar.d.ts +31 -31
- package/es/error-bar.js +60 -55
- package/es/helper-methods.d.ts +3 -3
- package/es/helper-methods.js +141 -153
- package/es/index.d.ts +2 -2
- package/es/victory-errorbar.d.ts +85 -85
- package/es/victory-errorbar.js +44 -83
- package/lib/error-bar.d.ts +31 -31
- package/lib/error-bar.js +61 -65
- package/lib/helper-methods.d.ts +3 -3
- package/lib/helper-methods.js +141 -171
- package/lib/index.d.ts +2 -2
- package/lib/index.js +0 -4
- package/lib/victory-errorbar.d.ts +85 -85
- package/lib/victory-errorbar.js +44 -91
- package/package.json +9 -12
- package/src/helper-methods.tsx +2 -2
package/lib/helper-methods.js
CHANGED
|
@@ -4,261 +4,231 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getDomain = exports.getData = exports.getBaseProps = void 0;
|
|
7
|
-
|
|
8
|
-
var _isNil2 = _interopRequireDefault(require("lodash/isNil"));
|
|
9
|
-
|
|
10
7
|
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
11
|
-
|
|
12
8
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
13
|
-
|
|
14
9
|
var _victoryCore = require("victory-core");
|
|
15
|
-
|
|
16
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
var getErrors = function (props, datum, axis) {
|
|
11
|
+
const getErrors = (props, datum, axis) => {
|
|
19
12
|
/**
|
|
20
13
|
* check if it is asymmetric error or symmetric error, asymmetric error should be an array
|
|
21
14
|
* and the first value is the positive error, the second is the negative error
|
|
22
15
|
* @param {Boolean} isArray(errorX)
|
|
23
16
|
* @return {String or Array}
|
|
24
17
|
*/
|
|
25
|
-
|
|
18
|
+
|
|
19
|
+
const errorNames = {
|
|
26
20
|
x: "_errorX",
|
|
27
21
|
y: "_errorY"
|
|
28
22
|
};
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
const errors = datum[errorNames[axis]];
|
|
31
24
|
if (errors === 0) {
|
|
32
25
|
return false;
|
|
33
26
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
return Array.isArray(errors) ? [errors[0] === 0 ? false : scale(errors[0] + datum["_".concat(axis)]), errors[1] === 0 ? false : scale(datum["_".concat(axis)] - errors[1])] : [scale(errors + datum["_".concat(axis)]), scale(datum["_".concat(axis)] - errors)];
|
|
27
|
+
const scale = props.scale[axis];
|
|
28
|
+
return Array.isArray(errors) ? [errors[0] === 0 ? false : scale(errors[0] + datum[`_${axis}`]), errors[1] === 0 ? false : scale(datum[`_${axis}`] - errors[1])] : [scale(errors + datum[`_${axis}`]), scale(datum[`_${axis}`] - errors)];
|
|
37
29
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var accessorTypes = ["x", "y", "errorX", "errorY"];
|
|
41
|
-
|
|
30
|
+
const getData = props => {
|
|
31
|
+
const accessorTypes = ["x", "y", "errorX", "errorY"];
|
|
42
32
|
if (props.data) {
|
|
43
33
|
return _victoryCore.Data.formatData(props.data, props, accessorTypes);
|
|
44
34
|
}
|
|
45
|
-
|
|
46
|
-
var generatedData = props.errorX || props.errorY ? _victoryCore.Data.generateData(props) : [];
|
|
35
|
+
const generatedData = props.errorX || props.errorY ? _victoryCore.Data.generateData(props) : [];
|
|
47
36
|
return _victoryCore.Data.formatData(generatedData, props, accessorTypes);
|
|
48
37
|
};
|
|
49
|
-
|
|
50
38
|
exports.getData = getData;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var maxDomain = _victoryCore.Domain.getMaxFromProps(props, axis);
|
|
56
|
-
|
|
57
|
-
var dataset = getData(props);
|
|
58
|
-
|
|
39
|
+
const getDomainFromData = (props, axis) => {
|
|
40
|
+
const minDomain = _victoryCore.Domain.getMinFromProps(props, axis);
|
|
41
|
+
const maxDomain = _victoryCore.Domain.getMaxFromProps(props, axis);
|
|
42
|
+
const dataset = getData(props);
|
|
59
43
|
if (dataset.length < 1) {
|
|
60
44
|
return minDomain !== undefined && maxDomain !== undefined ? _victoryCore.Domain.getDomainFromMinMax(minDomain, maxDomain) : undefined;
|
|
61
45
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
var currentError = Array.isArray(datum[error]) ? datum[error][errorIndex] : datum[error];
|
|
71
|
-
var current = datum["_".concat(axis)] + sign * (currentError || 0);
|
|
46
|
+
const error = axis === "x" ? "_errorX" : "_errorY";
|
|
47
|
+
const reduceErrorData = type => {
|
|
48
|
+
const baseCondition = type === "min" ? Infinity : -Infinity;
|
|
49
|
+
const errorIndex = type === "min" ? 1 : 0;
|
|
50
|
+
const sign = type === "min" ? -1 : 1;
|
|
51
|
+
return dataset.reduce((memo, datum) => {
|
|
52
|
+
const currentError = Array.isArray(datum[error]) ? datum[error][errorIndex] : datum[error];
|
|
53
|
+
const current = datum[`_${axis}`] + sign * (currentError || 0);
|
|
72
54
|
return memo < current && type === "min" || memo > current && type === "max" ? memo : current;
|
|
73
55
|
}, baseCondition);
|
|
74
56
|
};
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var max = maxDomain !== undefined ? maxDomain : reduceErrorData("max");
|
|
57
|
+
const min = minDomain !== undefined ? minDomain : reduceErrorData("min");
|
|
58
|
+
const max = maxDomain !== undefined ? maxDomain : reduceErrorData("max");
|
|
78
59
|
return _victoryCore.Domain.getDomainFromMinMax(min, max);
|
|
79
60
|
};
|
|
80
|
-
|
|
81
|
-
var getDomain = function (props, axis) {
|
|
61
|
+
const getDomain = (props, axis) => {
|
|
82
62
|
return _victoryCore.Domain.createDomainFunction(getDomainFromData)(props, axis);
|
|
83
|
-
};
|
|
84
|
-
|
|
63
|
+
};
|
|
85
64
|
|
|
65
|
+
// This method will edit or remove errorbar data points that fall outside of the desired domain
|
|
86
66
|
exports.getDomain = getDomain;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
_y = datum._y; // if either x or y center point is outside of the domain, null the entire data point
|
|
99
|
-
|
|
67
|
+
const formatDataFromDomain = (datum, domain) => {
|
|
68
|
+
const minDomainX = _victoryCore.Collection.getMinValue(domain.x);
|
|
69
|
+
const maxDomainX = _victoryCore.Collection.getMaxValue(domain.x);
|
|
70
|
+
const minDomainY = _victoryCore.Collection.getMinValue(domain.y);
|
|
71
|
+
const maxDomainY = _victoryCore.Collection.getMaxValue(domain.y);
|
|
72
|
+
let {
|
|
73
|
+
_x,
|
|
74
|
+
_y
|
|
75
|
+
} = datum;
|
|
76
|
+
|
|
77
|
+
// if either x or y center point is outside of the domain, null the entire data point
|
|
100
78
|
if (_x < minDomainX || _x > maxDomainX || _y < minDomainY || _y > maxDomainY) _x = _y = null;
|
|
101
79
|
return Object.assign({}, datum, {
|
|
102
|
-
_x
|
|
103
|
-
_y
|
|
80
|
+
_x,
|
|
81
|
+
_y
|
|
104
82
|
});
|
|
105
83
|
};
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
var data = getData(props);
|
|
112
|
-
var range = {
|
|
84
|
+
const getCalculatedValues = props => {
|
|
85
|
+
const defaultStyles = _victoryCore.Helpers.getDefaultStyles(props, "errorbar");
|
|
86
|
+
const style = _victoryCore.Helpers.getStyles(props.style, defaultStyles) || {};
|
|
87
|
+
const data = getData(props);
|
|
88
|
+
const range = {
|
|
113
89
|
x: _victoryCore.Helpers.getRange(props, "x"),
|
|
114
90
|
y: _victoryCore.Helpers.getRange(props, "y")
|
|
115
91
|
};
|
|
116
|
-
|
|
92
|
+
const domain = {
|
|
117
93
|
x: getDomain(props, "x"),
|
|
118
94
|
y: getDomain(props, "y")
|
|
119
95
|
};
|
|
120
|
-
|
|
96
|
+
const scale = {
|
|
121
97
|
x: _victoryCore.Scale.getBaseScale(props, "x").domain(domain.x).range(props.horizontal ? range.y : range.x),
|
|
122
98
|
y: _victoryCore.Scale.getBaseScale(props, "y").domain(domain.y).range(props.horizontal ? range.x : range.y)
|
|
123
99
|
};
|
|
124
|
-
|
|
100
|
+
const origin = props.polar ? props.origin || _victoryCore.Helpers.getPolarOrigin(props) : undefined;
|
|
125
101
|
return {
|
|
126
|
-
domain
|
|
127
|
-
data
|
|
128
|
-
scale
|
|
129
|
-
style
|
|
130
|
-
origin
|
|
102
|
+
domain,
|
|
103
|
+
data,
|
|
104
|
+
scale,
|
|
105
|
+
style,
|
|
106
|
+
origin
|
|
131
107
|
};
|
|
132
108
|
};
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
109
|
+
const getLabelProps = (dataProps, text, style) => {
|
|
110
|
+
const {
|
|
111
|
+
x,
|
|
112
|
+
y,
|
|
113
|
+
index,
|
|
114
|
+
scale,
|
|
115
|
+
errorY,
|
|
116
|
+
errorX,
|
|
117
|
+
horizontal,
|
|
118
|
+
labelComponent,
|
|
119
|
+
theme,
|
|
120
|
+
disableInlineStyles
|
|
121
|
+
} = dataProps;
|
|
122
|
+
const getError = function (type) {
|
|
123
|
+
if (type === void 0) {
|
|
124
|
+
type = "x";
|
|
125
|
+
}
|
|
126
|
+
const baseError = type === "y" ? errorY : errorX;
|
|
127
|
+
const error = baseError && Array.isArray(baseError) ? baseError[0] : baseError;
|
|
150
128
|
return error || dataProps[type];
|
|
151
129
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
var labelProps = {
|
|
130
|
+
const labelStyle = style.labels || {};
|
|
131
|
+
const padding = labelStyle.padding || 0;
|
|
132
|
+
const textAnchor = horizontal ? "start" : "middle";
|
|
133
|
+
const verticalAnchor = horizontal ? "middle" : "end";
|
|
134
|
+
const labelProps = {
|
|
158
135
|
style: labelStyle,
|
|
159
136
|
y: horizontal ? y : getError("y"),
|
|
160
137
|
x: horizontal ? getError("x") : x,
|
|
161
138
|
dy: horizontal ? 0 : -padding,
|
|
162
139
|
dx: horizontal ? padding : 0,
|
|
163
|
-
text
|
|
164
|
-
index
|
|
165
|
-
scale
|
|
140
|
+
text,
|
|
141
|
+
index,
|
|
142
|
+
scale,
|
|
166
143
|
datum: dataProps.datum,
|
|
167
144
|
data: dataProps.data,
|
|
168
145
|
textAnchor: labelStyle.textAnchor || textAnchor,
|
|
169
146
|
verticalAnchor: labelStyle.verticalAnchor || verticalAnchor,
|
|
170
147
|
angle: labelStyle.angle,
|
|
171
|
-
horizontal
|
|
172
|
-
disableInlineStyles
|
|
148
|
+
horizontal,
|
|
149
|
+
disableInlineStyles
|
|
173
150
|
};
|
|
174
|
-
|
|
175
151
|
if (!_victoryCore.Helpers.isTooltip(labelComponent)) {
|
|
176
152
|
return labelProps;
|
|
177
153
|
}
|
|
178
|
-
|
|
179
|
-
var tooltipTheme = theme && theme.tooltip || {};
|
|
154
|
+
const tooltipTheme = theme && theme.tooltip || {};
|
|
180
155
|
return (0, _defaults2.default)({}, labelProps, _victoryCore.Helpers.omit(tooltipTheme, ["style"]));
|
|
181
156
|
};
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
157
|
+
const getBaseProps = (initialProps, fallbackProps) => {
|
|
158
|
+
const modifiedProps = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, "errorbar");
|
|
159
|
+
const props = Object.assign({}, modifiedProps, getCalculatedValues(modifiedProps));
|
|
160
|
+
const {
|
|
161
|
+
borderWidth,
|
|
162
|
+
data,
|
|
163
|
+
domain,
|
|
164
|
+
events,
|
|
165
|
+
groupComponent,
|
|
166
|
+
height,
|
|
167
|
+
horizontal,
|
|
168
|
+
labels,
|
|
169
|
+
name,
|
|
170
|
+
origin,
|
|
171
|
+
padding,
|
|
172
|
+
polar,
|
|
173
|
+
scale,
|
|
174
|
+
sharedEvents,
|
|
175
|
+
standalone,
|
|
176
|
+
style,
|
|
177
|
+
theme,
|
|
178
|
+
width,
|
|
179
|
+
disableInlineStyles
|
|
180
|
+
} = props;
|
|
181
|
+
const initialChildProps = {
|
|
207
182
|
parent: {
|
|
208
|
-
data
|
|
209
|
-
domain
|
|
210
|
-
height
|
|
211
|
-
horizontal
|
|
212
|
-
name
|
|
213
|
-
origin
|
|
214
|
-
padding
|
|
215
|
-
polar
|
|
216
|
-
scale
|
|
217
|
-
standalone
|
|
183
|
+
data,
|
|
184
|
+
domain,
|
|
185
|
+
height,
|
|
186
|
+
horizontal,
|
|
187
|
+
name,
|
|
188
|
+
origin,
|
|
189
|
+
padding,
|
|
190
|
+
polar,
|
|
191
|
+
scale,
|
|
192
|
+
standalone,
|
|
218
193
|
style: style.parent,
|
|
219
|
-
theme
|
|
220
|
-
width
|
|
194
|
+
theme,
|
|
195
|
+
width
|
|
221
196
|
}
|
|
222
197
|
};
|
|
223
|
-
return data.reduce(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
data: data,
|
|
198
|
+
return data.reduce((childProps, datum, index) => {
|
|
199
|
+
const eventKey = !_victoryCore.Helpers.isNil(datum.eventKey) ? datum.eventKey : index;
|
|
200
|
+
const {
|
|
201
|
+
x,
|
|
202
|
+
y
|
|
203
|
+
} = _victoryCore.Helpers.scalePoint((0, _assign2.default)({}, props, {
|
|
204
|
+
scale
|
|
205
|
+
}), datum);
|
|
206
|
+
const formattedDatum = formatDataFromDomain(datum, domain);
|
|
207
|
+
const errorX = getErrors(props, formattedDatum, "x");
|
|
208
|
+
const errorY = getErrors(props, formattedDatum, "y");
|
|
209
|
+
const dataProps = {
|
|
210
|
+
borderWidth,
|
|
211
|
+
data,
|
|
238
212
|
datum: formattedDatum,
|
|
239
213
|
errorX: horizontal ? errorY : errorX,
|
|
240
214
|
errorY: horizontal ? errorX : errorY,
|
|
241
|
-
groupComponent
|
|
242
|
-
horizontal
|
|
243
|
-
index
|
|
244
|
-
scale
|
|
215
|
+
groupComponent,
|
|
216
|
+
horizontal,
|
|
217
|
+
index,
|
|
218
|
+
scale,
|
|
245
219
|
style: disableInlineStyles ? {} : style.data,
|
|
246
|
-
x
|
|
247
|
-
y
|
|
248
|
-
disableInlineStyles
|
|
220
|
+
x,
|
|
221
|
+
y,
|
|
222
|
+
disableInlineStyles
|
|
249
223
|
};
|
|
250
224
|
childProps[eventKey] = {
|
|
251
225
|
data: dataProps
|
|
252
226
|
};
|
|
253
|
-
|
|
254
|
-
var text = _victoryCore.LabelHelpers.getText(props, datum, index);
|
|
255
|
-
|
|
227
|
+
const text = _victoryCore.LabelHelpers.getText(props, datum, index);
|
|
256
228
|
if (text !== undefined && text !== null || labels && (events || sharedEvents)) {
|
|
257
229
|
childProps[eventKey].labels = getLabelProps(Object.assign({}, props, dataProps), text, style);
|
|
258
230
|
}
|
|
259
|
-
|
|
260
231
|
return childProps;
|
|
261
232
|
}, initialChildProps);
|
|
262
233
|
};
|
|
263
|
-
|
|
264
234
|
exports.getBaseProps = getBaseProps;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./victory-errorbar";
|
|
2
|
-
export * from "./error-bar";
|
|
1
|
+
export * from "./victory-errorbar";
|
|
2
|
+
export * from "./error-bar";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.js
CHANGED
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
var _victoryErrorbar = require("./victory-errorbar");
|
|
8
|
-
|
|
9
7
|
Object.keys(_victoryErrorbar).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _victoryErrorbar[key]) return;
|
|
@@ -16,9 +14,7 @@ Object.keys(_victoryErrorbar).forEach(function (key) {
|
|
|
16
14
|
}
|
|
17
15
|
});
|
|
18
16
|
});
|
|
19
|
-
|
|
20
17
|
var _errorBar = require("./error-bar");
|
|
21
|
-
|
|
22
18
|
Object.keys(_errorBar).forEach(function (key) {
|
|
23
19
|
if (key === "default" || key === "__esModule") return;
|
|
24
20
|
if (key in exports && exports[key] === _errorBar[key]) return;
|
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
|
|
3
|
-
export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
|
|
4
|
-
export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
|
|
5
|
-
export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
|
|
6
|
-
borderWidth?: number;
|
|
7
|
-
errorX?: ErrorType;
|
|
8
|
-
errorY?: ErrorType;
|
|
9
|
-
events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
|
|
10
|
-
style?: VictoryStyleInterface;
|
|
11
|
-
}
|
|
12
|
-
interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
|
|
13
|
-
}
|
|
14
|
-
declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
|
|
15
|
-
static animationWhitelist: string[];
|
|
16
|
-
static displayName: string;
|
|
17
|
-
static role: string;
|
|
18
|
-
static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
|
|
19
|
-
static defaultProps: VictoryErrorBarProps;
|
|
20
|
-
static getDomain: (props: any, axis: any) => any;
|
|
21
|
-
static getData: (props: any) => any;
|
|
22
|
-
static getBaseProps: (props: any) => any;
|
|
23
|
-
static expectedComponents: string[];
|
|
24
|
-
shouldAnimate(): boolean;
|
|
25
|
-
render(): React.ReactElement;
|
|
26
|
-
}
|
|
27
|
-
export declare const VictoryErrorBar: {
|
|
28
|
-
new (props: import("victory-core").EventMixinCommonProps): {
|
|
29
|
-
state: {};
|
|
30
|
-
getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
|
|
31
|
-
getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
|
|
32
|
-
getEvents: (p: any, target: any, eventKey: any) => any;
|
|
33
|
-
externalMutations: {} | undefined;
|
|
34
|
-
calculatedState: {};
|
|
35
|
-
globalEvents: {};
|
|
36
|
-
prevGlobalEventKeys: string[];
|
|
37
|
-
boundGlobalEvents: {};
|
|
38
|
-
shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
|
|
39
|
-
componentDidMount(): void;
|
|
40
|
-
componentDidUpdate(prevProps: any): void;
|
|
41
|
-
componentWillUnmount(): void;
|
|
42
|
-
addGlobalListener(key: any): void;
|
|
43
|
-
removeGlobalListener(key: any): void;
|
|
44
|
-
getStateChanges(props: any): {};
|
|
45
|
-
applyExternalMutations(props: any, externalMutations: any): void;
|
|
46
|
-
getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
|
|
47
|
-
getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
|
|
48
|
-
cacheValues(obj: any): void;
|
|
49
|
-
getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
|
|
50
|
-
getAllEvents(props: any): any;
|
|
51
|
-
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
|
|
52
|
-
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
53
|
-
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
54
|
-
renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
55
|
-
renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
56
|
-
context: unknown;
|
|
57
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
58
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
59
|
-
render(): React.ReactNode;
|
|
60
|
-
readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
|
|
61
|
-
refs: {
|
|
62
|
-
[key: string]: React.ReactInstance;
|
|
63
|
-
};
|
|
64
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
65
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
|
|
66
|
-
componentWillMount?(): void;
|
|
67
|
-
UNSAFE_componentWillMount?(): void;
|
|
68
|
-
componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
69
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
70
|
-
componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
71
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
72
|
-
componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
|
|
73
|
-
getSharedEventState: (key: string, value: string) => unknown;
|
|
74
|
-
baseProps: Record<string, object>;
|
|
75
|
-
dataKeys: string[];
|
|
76
|
-
hasEvents: unknown;
|
|
77
|
-
events: unknown;
|
|
78
|
-
};
|
|
79
|
-
getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
|
|
80
|
-
role?: string | undefined;
|
|
81
|
-
expectedComponents?: string[] | undefined;
|
|
82
|
-
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
|
|
83
|
-
animationWhitelist?: string[] | undefined;
|
|
84
|
-
} & typeof VictoryErrorBarBase;
|
|
85
|
-
export {};
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { EventPropTypeInterface, StringOrNumberOrCallback, StringOrNumberOrList, VictoryDatableProps, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, EventsMixinClass } from "victory-core";
|
|
3
|
+
export declare type VictoryErrorBarTTargetType = "data" | "labels" | "parent";
|
|
4
|
+
export declare type ErrorType = StringOrNumberOrList | ((...args: any[]) => StringOrNumberOrList);
|
|
5
|
+
export interface VictoryErrorBarProps extends Omit<VictoryCommonProps, "polar">, VictoryDatableProps, VictoryLabelableProps, VictoryMultiLabelableProps {
|
|
6
|
+
borderWidth?: number;
|
|
7
|
+
errorX?: ErrorType;
|
|
8
|
+
errorY?: ErrorType;
|
|
9
|
+
events?: EventPropTypeInterface<VictoryErrorBarTTargetType, StringOrNumberOrCallback>[];
|
|
10
|
+
style?: VictoryStyleInterface;
|
|
11
|
+
}
|
|
12
|
+
interface VictoryErrorBarBase extends EventsMixinClass<VictoryErrorBarProps> {
|
|
13
|
+
}
|
|
14
|
+
declare class VictoryErrorBarBase extends React.Component<VictoryErrorBarProps> {
|
|
15
|
+
static animationWhitelist: string[];
|
|
16
|
+
static displayName: string;
|
|
17
|
+
static role: string;
|
|
18
|
+
static defaultTransitions: import("victory-core").AnimatePropTypeInterface;
|
|
19
|
+
static defaultProps: VictoryErrorBarProps;
|
|
20
|
+
static getDomain: (props: any, axis: any) => any;
|
|
21
|
+
static getData: (props: any) => any;
|
|
22
|
+
static getBaseProps: (props: any) => any;
|
|
23
|
+
static expectedComponents: string[];
|
|
24
|
+
shouldAnimate(): boolean;
|
|
25
|
+
render(): React.ReactElement;
|
|
26
|
+
}
|
|
27
|
+
export declare const VictoryErrorBar: {
|
|
28
|
+
new (props: import("victory-core").EventMixinCommonProps): {
|
|
29
|
+
state: {};
|
|
30
|
+
getEventState: (eventKey: string | number, namespace: string, childType?: string | undefined) => any;
|
|
31
|
+
getScopedEvents: (events: any, namespace: any, childType: any, baseProps: any) => {};
|
|
32
|
+
getEvents: (p: any, target: any, eventKey: any) => any;
|
|
33
|
+
externalMutations: {} | undefined;
|
|
34
|
+
calculatedState: {};
|
|
35
|
+
globalEvents: {};
|
|
36
|
+
prevGlobalEventKeys: string[];
|
|
37
|
+
boundGlobalEvents: {};
|
|
38
|
+
shouldComponentUpdate(nextProps: import("victory-core").EventMixinCommonProps): boolean;
|
|
39
|
+
componentDidMount(): void;
|
|
40
|
+
componentDidUpdate(prevProps: any): void;
|
|
41
|
+
componentWillUnmount(): void;
|
|
42
|
+
addGlobalListener(key: any): void;
|
|
43
|
+
removeGlobalListener(key: any): void;
|
|
44
|
+
getStateChanges(props: any): {};
|
|
45
|
+
applyExternalMutations(props: any, externalMutations: any): void;
|
|
46
|
+
getCalculatedValues(props: any): import("victory-core").EventMixinCalculatedValues;
|
|
47
|
+
getExternalMutations(props: import("victory-core").EventMixinCommonProps): {} | undefined;
|
|
48
|
+
cacheValues(obj: any): void;
|
|
49
|
+
getBaseProps(props: any, getSharedEventState: any): Record<string, object>;
|
|
50
|
+
getAllEvents(props: any): any;
|
|
51
|
+
getComponentProps(component: React.ReactNode, type: string, index: string | number): any;
|
|
52
|
+
renderContainer(component: any, children: any): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
53
|
+
animateComponent(props: import("victory-core").EventMixinCommonProps, defaultAnimationWhitelist: string[]): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
54
|
+
renderContinuousData(props: import("victory-core").EventMixinCommonProps): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
55
|
+
renderData(props: any, shouldRenderDatum?: ((datum: any) => boolean) | undefined): React.DetailedReactHTMLElement<any, HTMLElement>;
|
|
56
|
+
context: unknown;
|
|
57
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("victory-core").EventMixinCommonProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
58
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
59
|
+
render(): React.ReactNode;
|
|
60
|
+
readonly props: Readonly<import("victory-core").EventMixinCommonProps>;
|
|
61
|
+
refs: {
|
|
62
|
+
[key: string]: React.ReactInstance;
|
|
63
|
+
};
|
|
64
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
65
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<import("victory-core").EventMixinCommonProps>, prevState: Readonly<{}>): any;
|
|
66
|
+
componentWillMount?(): void;
|
|
67
|
+
UNSAFE_componentWillMount?(): void;
|
|
68
|
+
componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
69
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextContext: any): void;
|
|
70
|
+
componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
71
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<import("victory-core").EventMixinCommonProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
72
|
+
componentEvents: import("victory-core/lib/victory-util/events").ComponentEvent[];
|
|
73
|
+
getSharedEventState: (key: string, value: string) => unknown;
|
|
74
|
+
baseProps: Record<string, object>;
|
|
75
|
+
dataKeys: string[];
|
|
76
|
+
hasEvents: unknown;
|
|
77
|
+
events: unknown;
|
|
78
|
+
};
|
|
79
|
+
getBaseProps?(props: import("victory-core").EventMixinCommonProps): Record<string, object>;
|
|
80
|
+
role?: string | undefined;
|
|
81
|
+
expectedComponents?: string[] | undefined;
|
|
82
|
+
getChildren?: ((props: import("victory-core").EventMixinCommonProps, childComponents?: React.ReactNode[] | undefined, calculatedProps?: import("victory-core").EventMixinCommonProps | undefined) => void) | undefined;
|
|
83
|
+
animationWhitelist?: string[] | undefined;
|
|
84
|
+
} & typeof VictoryErrorBarBase;
|
|
85
|
+
export {};
|
|
86
86
|
//# sourceMappingURL=victory-errorbar.d.ts.map
|