victory-stack 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 +11 -0
- package/dist/victory-stack.js +2642 -3542
- package/dist/victory-stack.min.js +1 -1
- package/es/helper-methods.d.ts +52 -52
- package/es/helper-methods.js +116 -163
- package/es/index.d.ts +1 -1
- package/es/victory-stack.d.ts +18 -18
- package/es/victory-stack.js +61 -72
- package/lib/helper-methods.d.ts +52 -52
- package/lib/helper-methods.js +116 -179
- package/lib/index.d.ts +1 -1
- package/lib/index.js +0 -2
- package/lib/victory-stack.d.ts +18 -18
- package/lib/victory-stack.js +60 -91
- package/package.json +12 -15
package/lib/helper-methods.js
CHANGED
|
@@ -7,87 +7,59 @@ exports.getCalculatedProps = getCalculatedProps;
|
|
|
7
7
|
exports.getChildProps = getChildProps;
|
|
8
8
|
exports.getChildren = getChildren;
|
|
9
9
|
exports.useMemoizedProps = useMemoizedProps;
|
|
10
|
-
|
|
11
10
|
var _orderBy2 = _interopRequireDefault(require("lodash/orderBy"));
|
|
12
|
-
|
|
13
11
|
var _keys2 = _interopRequireDefault(require("lodash/keys"));
|
|
14
|
-
|
|
15
12
|
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
|
|
17
13
|
var _victoryCore = require("victory-core");
|
|
18
|
-
|
|
19
14
|
var _reactFastCompare = _interopRequireDefault(require("react-fast-compare"));
|
|
20
|
-
|
|
21
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
/* eslint-disable no-use-before-define */
|
|
22
17
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
26
|
-
|
|
27
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
28
|
-
|
|
29
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
30
|
-
|
|
31
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
32
|
-
|
|
33
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
34
|
-
|
|
35
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
36
|
-
|
|
37
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
38
|
-
|
|
39
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
40
|
-
|
|
41
|
-
var fallbackProps = {
|
|
18
|
+
const fallbackProps = {
|
|
42
19
|
width: 450,
|
|
43
20
|
height: 300,
|
|
44
21
|
padding: 50
|
|
45
|
-
};
|
|
22
|
+
};
|
|
46
23
|
|
|
24
|
+
// Assumes data in `datasets` is sorted by `Data.getData`.
|
|
47
25
|
function fillData(props, datasets) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
26
|
+
const {
|
|
27
|
+
fillInMissingData
|
|
28
|
+
} = props;
|
|
29
|
+
const xMap = datasets.reduce((prev, dataset) => {
|
|
30
|
+
dataset.forEach(datum => {
|
|
51
31
|
prev[datum._x instanceof Date ? datum._x.getTime() : datum._x] = true;
|
|
52
32
|
});
|
|
53
33
|
return prev;
|
|
54
34
|
}, {});
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var parsedX = Number(x);
|
|
64
|
-
var datum = dataset[index - indexOffset];
|
|
65
|
-
|
|
35
|
+
const xKeys = (0, _keys2.default)(xMap).map(k => Number(k));
|
|
36
|
+
const xArr = (0, _orderBy2.default)(xKeys);
|
|
37
|
+
return datasets.map(dataset => {
|
|
38
|
+
let indexOffset = 0;
|
|
39
|
+
const isDate = dataset[0] && dataset[0]._x instanceof Date;
|
|
40
|
+
const filledInData = xArr.map((x, index) => {
|
|
41
|
+
let parsedX = Number(x);
|
|
42
|
+
const datum = dataset[index - indexOffset];
|
|
66
43
|
if (datum) {
|
|
67
|
-
|
|
68
|
-
|
|
44
|
+
const x1 = isDate ? datum._x.getTime() : datum._x;
|
|
69
45
|
if (x1 === parsedX) {
|
|
70
46
|
return datum;
|
|
71
47
|
}
|
|
72
|
-
|
|
73
48
|
indexOffset++;
|
|
74
|
-
|
|
75
|
-
var _y = fillInMissingData ? 0 : null;
|
|
76
|
-
|
|
49
|
+
const y = fillInMissingData ? 0 : null;
|
|
77
50
|
parsedX = isDate ? new Date(parsedX) : parsedX;
|
|
78
51
|
return {
|
|
79
52
|
x: parsedX,
|
|
80
|
-
y
|
|
53
|
+
y,
|
|
81
54
|
_x: parsedX,
|
|
82
|
-
_y:
|
|
55
|
+
_y: y
|
|
83
56
|
};
|
|
84
57
|
}
|
|
85
|
-
|
|
86
|
-
var y = fillInMissingData ? 0 : null;
|
|
58
|
+
const y = fillInMissingData ? 0 : null;
|
|
87
59
|
parsedX = isDate ? new Date(parsedX) : parsedX;
|
|
88
60
|
return {
|
|
89
61
|
x: parsedX,
|
|
90
|
-
y
|
|
62
|
+
y,
|
|
91
63
|
_x: parsedX,
|
|
92
64
|
_y: y
|
|
93
65
|
};
|
|
@@ -95,40 +67,29 @@ function fillData(props, datasets) {
|
|
|
95
67
|
return filledInData;
|
|
96
68
|
});
|
|
97
69
|
}
|
|
98
|
-
|
|
99
70
|
function getY0(datum, index, datasets) {
|
|
100
71
|
if (datum.y0) {
|
|
101
72
|
return datum.y0;
|
|
102
73
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
var previousDatasets = datasets.slice(0, index);
|
|
110
|
-
var previousPoints = previousDatasets.reduce(function (prev, dataset) {
|
|
111
|
-
return prev.concat(dataset.filter(function (previousDatum) {
|
|
112
|
-
return datum._x instanceof Date ? previousDatum._x.getTime() === datum._x.getTime() : previousDatum._x === datum._x;
|
|
113
|
-
}).map(function (previousDatum) {
|
|
114
|
-
return previousDatum._y || 0;
|
|
115
|
-
}));
|
|
74
|
+
const y = datum._y;
|
|
75
|
+
const group = datum._group;
|
|
76
|
+
const firstDatasetBaseline = datasets[0].map(d => d.y0);
|
|
77
|
+
const previousDatasets = datasets.slice(0, index);
|
|
78
|
+
const previousPoints = previousDatasets.reduce((prev, dataset) => {
|
|
79
|
+
return prev.concat(dataset.filter(previousDatum => datum._x instanceof Date ? previousDatum._x.getTime() === datum._x.getTime() : previousDatum._x === datum._x).map(previousDatum => previousDatum._y || 0));
|
|
116
80
|
}, []);
|
|
117
|
-
|
|
118
|
-
|
|
81
|
+
const y0 = previousPoints.length && previousPoints.reduce((memo, value) => {
|
|
82
|
+
const sameSign = y < 0 && value < 0 || y >= 0 && value >= 0;
|
|
119
83
|
return sameSign ? Number(value) + memo : memo;
|
|
120
84
|
}, firstDatasetBaseline[group] || 0);
|
|
121
|
-
return previousPoints.some(
|
|
122
|
-
return point instanceof Date;
|
|
123
|
-
}) ? new Date(y0) : y0;
|
|
85
|
+
return previousPoints.some(point => point instanceof Date) ? new Date(y0) : y0;
|
|
124
86
|
}
|
|
125
|
-
/* eslint-disable no-nested-ternary */
|
|
126
|
-
|
|
127
87
|
|
|
88
|
+
/* eslint-disable no-nested-ternary */
|
|
128
89
|
function addLayoutData(props, datasets, index) {
|
|
129
|
-
|
|
130
|
-
return datasets[index].map(
|
|
131
|
-
|
|
90
|
+
const xOffset = props.xOffset || 0;
|
|
91
|
+
return datasets[index].map(datum => {
|
|
92
|
+
const yOffset = getY0(datum, index, datasets) || 0;
|
|
132
93
|
return Object.assign({}, datum, {
|
|
133
94
|
_y0: !(datum._y instanceof Date) ? yOffset : yOffset ? new Date(yOffset) : datum._y,
|
|
134
95
|
_y1: datum._y === null ? null : datum._y instanceof Date ? new Date(Number(datum._y) + Number(yOffset)) : datum._y + yOffset,
|
|
@@ -138,176 +99,152 @@ function addLayoutData(props, datasets, index) {
|
|
|
138
99
|
}
|
|
139
100
|
/* eslint-enable no-nested-ternary */
|
|
140
101
|
|
|
141
|
-
|
|
142
102
|
function stackData(props, childComponents) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
return datum._x !== null && datum._y !== null;
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
var datasets = fillData(props, filterNullChildData);
|
|
151
|
-
return datasets.map(function (d, i) {
|
|
152
|
-
return addLayoutData(props, datasets, i);
|
|
153
|
-
});
|
|
103
|
+
const dataFromChildren = _victoryCore.Wrapper.getDataFromChildren(props, childComponents);
|
|
104
|
+
const filterNullChildData = dataFromChildren.map(dataset => dataset.filter(datum => datum._x !== null && datum._y !== null));
|
|
105
|
+
const datasets = fillData(props, filterNullChildData);
|
|
106
|
+
return datasets.map((d, i) => addLayoutData(props, datasets, i));
|
|
154
107
|
}
|
|
155
|
-
|
|
156
108
|
function getCalculatedProps(initialProps, childComponents) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
var categories = props.categories || _victoryCore.Wrapper.getCategories(props, children);
|
|
166
|
-
|
|
167
|
-
var datasets = props.datasets || stackData(props, children);
|
|
168
|
-
var clonedChildren = children.map(function (c, i) {
|
|
109
|
+
const children = childComponents || _react.default.Children.toArray(initialProps.children);
|
|
110
|
+
const role = "stack";
|
|
111
|
+
const props = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, role);
|
|
112
|
+
const style = _victoryCore.Wrapper.getStyle(props.theme, props.style, role);
|
|
113
|
+
const categories = props.categories || _victoryCore.Wrapper.getCategories(props, children);
|
|
114
|
+
const datasets = props.datasets || stackData(props, children);
|
|
115
|
+
const clonedChildren = children.map((c, i) => {
|
|
169
116
|
return /*#__PURE__*/_react.default.cloneElement(c, {
|
|
170
117
|
data: datasets[i]
|
|
171
118
|
});
|
|
172
119
|
});
|
|
173
|
-
|
|
120
|
+
const domain = {
|
|
174
121
|
x: _victoryCore.Wrapper.getDomain(Object.assign({}, props, {
|
|
175
|
-
categories
|
|
122
|
+
categories
|
|
176
123
|
}), "x", clonedChildren),
|
|
177
124
|
y: _victoryCore.Wrapper.getDomain(Object.assign({}, props, {
|
|
178
|
-
categories
|
|
125
|
+
categories
|
|
179
126
|
}), "y", clonedChildren)
|
|
180
127
|
};
|
|
181
|
-
|
|
128
|
+
const range = props.range || {
|
|
182
129
|
x: _victoryCore.Helpers.getRange(props, "x"),
|
|
183
130
|
y: _victoryCore.Helpers.getRange(props, "y")
|
|
184
131
|
};
|
|
185
|
-
|
|
132
|
+
const baseScale = {
|
|
186
133
|
x: _victoryCore.Scale.getScaleFromProps(props, "x") || _victoryCore.Wrapper.getScale(props, "x"),
|
|
187
134
|
y: _victoryCore.Scale.getScaleFromProps(props, "y") || _victoryCore.Wrapper.getScale(props, "y")
|
|
188
135
|
};
|
|
189
|
-
|
|
136
|
+
const scale = {
|
|
190
137
|
x: baseScale.x.domain(domain.x).range(props.horizontal ? range.y : range.x),
|
|
191
138
|
y: baseScale.y.domain(domain.y).range(props.horizontal ? range.x : range.y)
|
|
192
139
|
};
|
|
193
|
-
|
|
194
|
-
|
|
140
|
+
const {
|
|
141
|
+
colorScale,
|
|
142
|
+
horizontal
|
|
143
|
+
} = props;
|
|
195
144
|
return {
|
|
196
|
-
datasets
|
|
197
|
-
categories
|
|
198
|
-
range
|
|
199
|
-
domain
|
|
200
|
-
horizontal
|
|
201
|
-
scale
|
|
202
|
-
style
|
|
203
|
-
colorScale
|
|
204
|
-
role
|
|
145
|
+
datasets,
|
|
146
|
+
categories,
|
|
147
|
+
range,
|
|
148
|
+
domain,
|
|
149
|
+
horizontal,
|
|
150
|
+
scale,
|
|
151
|
+
style,
|
|
152
|
+
colorScale,
|
|
153
|
+
role
|
|
205
154
|
};
|
|
206
|
-
}
|
|
207
|
-
// With shared events, the props change on every event, and every value is re-calculated
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
var withoutSharedEvents = function (props) {
|
|
211
|
-
var children = props.children;
|
|
155
|
+
}
|
|
212
156
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
157
|
+
// We need to remove sharedEvents in order to memoize the calculated data
|
|
158
|
+
// With shared events, the props change on every event, and every value is re-calculated
|
|
159
|
+
const withoutSharedEvents = props => {
|
|
160
|
+
const {
|
|
161
|
+
children
|
|
162
|
+
} = props;
|
|
163
|
+
const modifiedChildren = _react.default.Children.toArray(children).map(_child => {
|
|
164
|
+
const child = _child;
|
|
165
|
+
return {
|
|
166
|
+
...child,
|
|
216
167
|
props: _victoryCore.Helpers.omit(child.props, ["sharedEvents"])
|
|
217
|
-
}
|
|
168
|
+
};
|
|
218
169
|
});
|
|
219
|
-
|
|
220
170
|
props.children = modifiedChildren;
|
|
221
171
|
return props;
|
|
222
172
|
};
|
|
223
|
-
|
|
224
173
|
function useMemoizedProps(initialProps) {
|
|
225
|
-
|
|
174
|
+
const modifiedProps = withoutSharedEvents(initialProps);
|
|
175
|
+
const [props, setProps] = _react.default.useState(modifiedProps);
|
|
226
176
|
|
|
227
|
-
|
|
228
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
229
|
-
props = _React$useState2[0],
|
|
230
|
-
setProps = _React$useState2[1]; // React.memo uses shallow equality to compare objects. This way props
|
|
177
|
+
// React.memo uses shallow equality to compare objects. This way props
|
|
231
178
|
// will only be re-calculated when they change.
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
_react.default.useEffect(function () {
|
|
179
|
+
_react.default.useEffect(() => {
|
|
235
180
|
if (!(0, _reactFastCompare.default)(modifiedProps, props)) {
|
|
236
181
|
setProps(modifiedProps);
|
|
237
182
|
}
|
|
238
183
|
}, [props, setProps, modifiedProps]);
|
|
239
|
-
|
|
240
|
-
return _react.default.useMemo(function () {
|
|
184
|
+
return _react.default.useMemo(() => {
|
|
241
185
|
return getCalculatedProps(props, props.children);
|
|
242
186
|
}, [props]);
|
|
243
187
|
}
|
|
244
|
-
|
|
245
188
|
function getLabels(props, datasets, index) {
|
|
246
189
|
if (!props.labels) {
|
|
247
190
|
return undefined;
|
|
248
191
|
}
|
|
249
|
-
|
|
250
192
|
return datasets.length === index + 1 ? props.labels : undefined;
|
|
251
193
|
}
|
|
252
|
-
|
|
253
194
|
function getChildProps(props, calculatedProps) {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
195
|
+
const {
|
|
196
|
+
categories,
|
|
197
|
+
domain,
|
|
198
|
+
range,
|
|
199
|
+
scale,
|
|
200
|
+
horizontal
|
|
201
|
+
} = calculatedProps;
|
|
259
202
|
return {
|
|
260
203
|
height: props.height,
|
|
261
204
|
width: props.width,
|
|
262
205
|
padding: _victoryCore.Helpers.getPadding(props),
|
|
263
206
|
standalone: false,
|
|
264
207
|
theme: props.theme,
|
|
265
|
-
categories
|
|
266
|
-
domain
|
|
267
|
-
range
|
|
268
|
-
scale
|
|
269
|
-
horizontal
|
|
208
|
+
categories,
|
|
209
|
+
domain,
|
|
210
|
+
range,
|
|
211
|
+
scale,
|
|
212
|
+
horizontal
|
|
270
213
|
};
|
|
271
214
|
}
|
|
272
|
-
|
|
273
215
|
function getColorScale(props, child) {
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
216
|
+
const role = child.type && child.type.role;
|
|
217
|
+
const colorScaleOptions = child.props.colorScale || props.colorScale;
|
|
277
218
|
if (role !== "group" && role !== "stack") {
|
|
278
219
|
return undefined;
|
|
279
220
|
}
|
|
280
|
-
|
|
281
221
|
return props.theme ? colorScaleOptions || props.theme.props.colorScale : colorScaleOptions;
|
|
282
222
|
}
|
|
283
|
-
|
|
284
223
|
function getChildren(initialProps, childComponents, calculatedProps) {
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
return children.map(
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
var labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
|
|
300
|
-
var name = child.props.name || "".concat(parentName, "-").concat(role, "-").concat(index);
|
|
224
|
+
const props = _victoryCore.Helpers.modifyProps(initialProps, fallbackProps, "stack");
|
|
225
|
+
const children = childComponents || _react.default.Children.toArray(props.children);
|
|
226
|
+
const newCalculatedProps = calculatedProps || getCalculatedProps(props, children);
|
|
227
|
+
const {
|
|
228
|
+
datasets
|
|
229
|
+
} = newCalculatedProps;
|
|
230
|
+
const childProps = getChildProps(props, newCalculatedProps);
|
|
231
|
+
const parentName = props.name || "stack";
|
|
232
|
+
return children.map((child, index) => {
|
|
233
|
+
const role = child.type && child.type.role;
|
|
234
|
+
const data = datasets[index];
|
|
235
|
+
const style = _victoryCore.Wrapper.getChildStyle(child, index, newCalculatedProps);
|
|
236
|
+
const labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
|
|
237
|
+
const name = child.props.name || `${parentName}-${role}-${index}`;
|
|
301
238
|
return /*#__PURE__*/_react.default.cloneElement(child, Object.assign({
|
|
302
|
-
key:
|
|
303
|
-
labels
|
|
304
|
-
name
|
|
239
|
+
key: `${name}-key-${index}`,
|
|
240
|
+
labels,
|
|
241
|
+
name,
|
|
305
242
|
domainPadding: child.props.domainPadding || props.domainPadding,
|
|
306
243
|
theme: props.theme,
|
|
307
244
|
labelComponent: props.labelComponent || child.props.labelComponent,
|
|
308
|
-
style
|
|
245
|
+
style,
|
|
309
246
|
colorScale: getColorScale(props, child),
|
|
310
|
-
data
|
|
247
|
+
data,
|
|
311
248
|
polar: props.polar
|
|
312
249
|
}, childProps));
|
|
313
250
|
});
|
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./victory-stack";
|
|
1
|
+
export * from "./victory-stack";
|
|
2
2
|
//# 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 _victoryStack = require("./victory-stack");
|
|
8
|
-
|
|
9
7
|
Object.keys(_victoryStack).forEach(function (key) {
|
|
10
8
|
if (key === "default" || key === "__esModule") return;
|
|
11
9
|
if (key in exports && exports[key] === _victoryStack[key]) return;
|
package/lib/victory-stack.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CategoryPropType, ColorScalePropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
|
|
3
|
-
export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
|
|
4
|
-
export interface VictoryStackProps extends VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps {
|
|
5
|
-
bins?: number | number[] | Date[];
|
|
6
|
-
categories?: CategoryPropType;
|
|
7
|
-
children?: React.ReactNode | React.ReactNode[];
|
|
8
|
-
colorScale?: ColorScalePropType;
|
|
9
|
-
domain?: DomainPropType;
|
|
10
|
-
events?: EventPropTypeInterface<VictoryStackTTargetType, StringOrNumberOrCallback>[];
|
|
11
|
-
eventKey?: StringOrNumberOrCallback;
|
|
12
|
-
fillInMissingData?: boolean;
|
|
13
|
-
style?: VictoryStyleInterface;
|
|
14
|
-
xOffset?: number;
|
|
15
|
-
}
|
|
16
|
-
export declare const VictoryStack: React.NamedExoticComponent<VictoryStackProps> & {
|
|
17
|
-
readonly type: (initialProps: VictoryStackProps) => JSX.Element;
|
|
18
|
-
} & VictoryComponentConfiguration<VictoryStackProps>;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CategoryPropType, ColorScalePropType, DomainPropType, EventPropTypeInterface, StringOrNumberOrCallback, VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps, VictoryStyleInterface, VictoryComponentConfiguration } from "victory-core";
|
|
3
|
+
export declare type VictoryStackTTargetType = "data" | "labels" | "parent";
|
|
4
|
+
export interface VictoryStackProps extends VictoryCommonProps, VictoryLabelableProps, VictoryMultiLabelableProps {
|
|
5
|
+
bins?: number | number[] | Date[];
|
|
6
|
+
categories?: CategoryPropType;
|
|
7
|
+
children?: React.ReactNode | React.ReactNode[];
|
|
8
|
+
colorScale?: ColorScalePropType;
|
|
9
|
+
domain?: DomainPropType;
|
|
10
|
+
events?: EventPropTypeInterface<VictoryStackTTargetType, StringOrNumberOrCallback>[];
|
|
11
|
+
eventKey?: StringOrNumberOrCallback;
|
|
12
|
+
fillInMissingData?: boolean;
|
|
13
|
+
style?: VictoryStyleInterface;
|
|
14
|
+
xOffset?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const VictoryStack: React.NamedExoticComponent<VictoryStackProps> & {
|
|
17
|
+
readonly type: (initialProps: VictoryStackProps) => JSX.Element;
|
|
18
|
+
} & VictoryComponentConfiguration<VictoryStackProps>;
|
|
19
19
|
//# sourceMappingURL=victory-stack.d.ts.map
|