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