victory-errorbar 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 +10 -12
- package/README.md +2 -2
- package/dist/victory-errorbar.js +3310 -4511
- 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 -152
- 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 -169
- 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 +7 -4
package/lib/helper-methods.js
CHANGED
|
@@ -4,259 +4,231 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getDomain = exports.getData = exports.getBaseProps = void 0;
|
|
7
|
-
|
|
8
7
|
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
9
|
-
|
|
10
8
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
11
|
-
|
|
12
9
|
var _victoryCore = require("victory-core");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
var getErrors = function (props, datum, axis) {
|
|
11
|
+
const getErrors = (props, datum, axis) => {
|
|
17
12
|
/**
|
|
18
13
|
* check if it is asymmetric error or symmetric error, asymmetric error should be an array
|
|
19
14
|
* and the first value is the positive error, the second is the negative error
|
|
20
15
|
* @param {Boolean} isArray(errorX)
|
|
21
16
|
* @return {String or Array}
|
|
22
17
|
*/
|
|
23
|
-
|
|
18
|
+
|
|
19
|
+
const errorNames = {
|
|
24
20
|
x: "_errorX",
|
|
25
21
|
y: "_errorY"
|
|
26
22
|
};
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
const errors = datum[errorNames[axis]];
|
|
29
24
|
if (errors === 0) {
|
|
30
25
|
return false;
|
|
31
26
|
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
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)];
|
|
35
29
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var accessorTypes = ["x", "y", "errorX", "errorY"];
|
|
39
|
-
|
|
30
|
+
const getData = props => {
|
|
31
|
+
const accessorTypes = ["x", "y", "errorX", "errorY"];
|
|
40
32
|
if (props.data) {
|
|
41
33
|
return _victoryCore.Data.formatData(props.data, props, accessorTypes);
|
|
42
34
|
}
|
|
43
|
-
|
|
44
|
-
var generatedData = props.errorX || props.errorY ? _victoryCore.Data.generateData(props) : [];
|
|
35
|
+
const generatedData = props.errorX || props.errorY ? _victoryCore.Data.generateData(props) : [];
|
|
45
36
|
return _victoryCore.Data.formatData(generatedData, props, accessorTypes);
|
|
46
37
|
};
|
|
47
|
-
|
|
48
38
|
exports.getData = getData;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
var maxDomain = _victoryCore.Domain.getMaxFromProps(props, axis);
|
|
54
|
-
|
|
55
|
-
var dataset = getData(props);
|
|
56
|
-
|
|
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);
|
|
57
43
|
if (dataset.length < 1) {
|
|
58
44
|
return minDomain !== undefined && maxDomain !== undefined ? _victoryCore.Domain.getDomainFromMinMax(minDomain, maxDomain) : undefined;
|
|
59
45
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
var currentError = Array.isArray(datum[error]) ? datum[error][errorIndex] : datum[error];
|
|
69
|
-
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);
|
|
70
54
|
return memo < current && type === "min" || memo > current && type === "max" ? memo : current;
|
|
71
55
|
}, baseCondition);
|
|
72
56
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
var max = maxDomain !== undefined ? maxDomain : reduceErrorData("max");
|
|
57
|
+
const min = minDomain !== undefined ? minDomain : reduceErrorData("min");
|
|
58
|
+
const max = maxDomain !== undefined ? maxDomain : reduceErrorData("max");
|
|
76
59
|
return _victoryCore.Domain.getDomainFromMinMax(min, max);
|
|
77
60
|
};
|
|
78
|
-
|
|
79
|
-
var getDomain = function (props, axis) {
|
|
61
|
+
const getDomain = (props, axis) => {
|
|
80
62
|
return _victoryCore.Domain.createDomainFunction(getDomainFromData)(props, axis);
|
|
81
|
-
};
|
|
82
|
-
|
|
63
|
+
};
|
|
83
64
|
|
|
65
|
+
// This method will edit or remove errorbar data points that fall outside of the desired domain
|
|
84
66
|
exports.getDomain = getDomain;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
_y = datum._y; // if either x or y center point is outside of the domain, null the entire data point
|
|
97
|
-
|
|
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
|
|
98
78
|
if (_x < minDomainX || _x > maxDomainX || _y < minDomainY || _y > maxDomainY) _x = _y = null;
|
|
99
79
|
return Object.assign({}, datum, {
|
|
100
|
-
_x
|
|
101
|
-
_y
|
|
80
|
+
_x,
|
|
81
|
+
_y
|
|
102
82
|
});
|
|
103
83
|
};
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var data = getData(props);
|
|
110
|
-
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 = {
|
|
111
89
|
x: _victoryCore.Helpers.getRange(props, "x"),
|
|
112
90
|
y: _victoryCore.Helpers.getRange(props, "y")
|
|
113
91
|
};
|
|
114
|
-
|
|
92
|
+
const domain = {
|
|
115
93
|
x: getDomain(props, "x"),
|
|
116
94
|
y: getDomain(props, "y")
|
|
117
95
|
};
|
|
118
|
-
|
|
96
|
+
const scale = {
|
|
119
97
|
x: _victoryCore.Scale.getBaseScale(props, "x").domain(domain.x).range(props.horizontal ? range.y : range.x),
|
|
120
98
|
y: _victoryCore.Scale.getBaseScale(props, "y").domain(domain.y).range(props.horizontal ? range.x : range.y)
|
|
121
99
|
};
|
|
122
|
-
|
|
100
|
+
const origin = props.polar ? props.origin || _victoryCore.Helpers.getPolarOrigin(props) : undefined;
|
|
123
101
|
return {
|
|
124
|
-
domain
|
|
125
|
-
data
|
|
126
|
-
scale
|
|
127
|
-
style
|
|
128
|
-
origin
|
|
102
|
+
domain,
|
|
103
|
+
data,
|
|
104
|
+
scale,
|
|
105
|
+
style,
|
|
106
|
+
origin
|
|
129
107
|
};
|
|
130
108
|
};
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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;
|
|
148
128
|
return error || dataProps[type];
|
|
149
129
|
};
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
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 = {
|
|
156
135
|
style: labelStyle,
|
|
157
136
|
y: horizontal ? y : getError("y"),
|
|
158
137
|
x: horizontal ? getError("x") : x,
|
|
159
138
|
dy: horizontal ? 0 : -padding,
|
|
160
139
|
dx: horizontal ? padding : 0,
|
|
161
|
-
text
|
|
162
|
-
index
|
|
163
|
-
scale
|
|
140
|
+
text,
|
|
141
|
+
index,
|
|
142
|
+
scale,
|
|
164
143
|
datum: dataProps.datum,
|
|
165
144
|
data: dataProps.data,
|
|
166
145
|
textAnchor: labelStyle.textAnchor || textAnchor,
|
|
167
146
|
verticalAnchor: labelStyle.verticalAnchor || verticalAnchor,
|
|
168
147
|
angle: labelStyle.angle,
|
|
169
|
-
horizontal
|
|
170
|
-
disableInlineStyles
|
|
148
|
+
horizontal,
|
|
149
|
+
disableInlineStyles
|
|
171
150
|
};
|
|
172
|
-
|
|
173
151
|
if (!_victoryCore.Helpers.isTooltip(labelComponent)) {
|
|
174
152
|
return labelProps;
|
|
175
153
|
}
|
|
176
|
-
|
|
177
|
-
var tooltipTheme = theme && theme.tooltip || {};
|
|
154
|
+
const tooltipTheme = theme && theme.tooltip || {};
|
|
178
155
|
return (0, _defaults2.default)({}, labelProps, _victoryCore.Helpers.omit(tooltipTheme, ["style"]));
|
|
179
156
|
};
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
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 = {
|
|
205
182
|
parent: {
|
|
206
|
-
data
|
|
207
|
-
domain
|
|
208
|
-
height
|
|
209
|
-
horizontal
|
|
210
|
-
name
|
|
211
|
-
origin
|
|
212
|
-
padding
|
|
213
|
-
polar
|
|
214
|
-
scale
|
|
215
|
-
standalone
|
|
183
|
+
data,
|
|
184
|
+
domain,
|
|
185
|
+
height,
|
|
186
|
+
horizontal,
|
|
187
|
+
name,
|
|
188
|
+
origin,
|
|
189
|
+
padding,
|
|
190
|
+
polar,
|
|
191
|
+
scale,
|
|
192
|
+
standalone,
|
|
216
193
|
style: style.parent,
|
|
217
|
-
theme
|
|
218
|
-
width
|
|
194
|
+
theme,
|
|
195
|
+
width
|
|
219
196
|
}
|
|
220
197
|
};
|
|
221
|
-
return data.reduce(
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
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,
|
|
236
212
|
datum: formattedDatum,
|
|
237
213
|
errorX: horizontal ? errorY : errorX,
|
|
238
214
|
errorY: horizontal ? errorX : errorY,
|
|
239
|
-
groupComponent
|
|
240
|
-
horizontal
|
|
241
|
-
index
|
|
242
|
-
scale
|
|
215
|
+
groupComponent,
|
|
216
|
+
horizontal,
|
|
217
|
+
index,
|
|
218
|
+
scale,
|
|
243
219
|
style: disableInlineStyles ? {} : style.data,
|
|
244
|
-
x
|
|
245
|
-
y
|
|
246
|
-
disableInlineStyles
|
|
220
|
+
x,
|
|
221
|
+
y,
|
|
222
|
+
disableInlineStyles
|
|
247
223
|
};
|
|
248
224
|
childProps[eventKey] = {
|
|
249
225
|
data: dataProps
|
|
250
226
|
};
|
|
251
|
-
|
|
252
|
-
var text = _victoryCore.LabelHelpers.getText(props, datum, index);
|
|
253
|
-
|
|
227
|
+
const text = _victoryCore.LabelHelpers.getText(props, datum, index);
|
|
254
228
|
if (text !== undefined && text !== null || labels && (events || sharedEvents)) {
|
|
255
229
|
childProps[eventKey].labels = getLabelProps(Object.assign({}, props, dataProps), text, style);
|
|
256
230
|
}
|
|
257
|
-
|
|
258
231
|
return childProps;
|
|
259
232
|
}, initialChildProps);
|
|
260
233
|
};
|
|
261
|
-
|
|
262
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
|