victory-box-plot 36.2.2 → 36.4.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/dist/victory-box-plot.js +16725 -17106
- package/dist/victory-box-plot.min.js +1 -1
- package/es/helper-methods.js +1 -1
- package/es/victory-box-plot.js +128 -154
- package/lib/helper-methods.js +2 -2
- package/lib/victory-box-plot.js +128 -154
- package/package.json +4 -4
- package/src/helper-methods.js +5 -1
- package/src/victory-box-plot.js +7 -2
package/es/helper-methods.js
CHANGED
|
@@ -10,7 +10,7 @@ import _orderBy from "lodash/orderBy";
|
|
|
10
10
|
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; }
|
|
11
11
|
|
|
12
12
|
import { Helpers, Scale, Domain, Data, Collection } from "victory-core";
|
|
13
|
-
import { min as d3Min, max as d3Max, quantile as d3Quantile } from "d3-array";
|
|
13
|
+
import { min as d3Min, max as d3Max, quantile as d3Quantile } from "victory-vendor/d3-array";
|
|
14
14
|
var TYPES = ["max", "min", "median", "q1", "q3"];
|
|
15
15
|
|
|
16
16
|
var checkProcessedData = function (data) {
|
package/es/victory-box-plot.js
CHANGED
|
@@ -1,33 +1,47 @@
|
|
|
1
1
|
import _isNil from "lodash/isNil";
|
|
2
2
|
import _flatten from "lodash/flatten";
|
|
3
3
|
|
|
4
|
-
function
|
|
4
|
+
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; }
|
|
5
5
|
|
|
6
|
-
function
|
|
6
|
+
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; }
|
|
7
|
+
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
7
9
|
|
|
8
|
-
function
|
|
10
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
11
|
|
|
10
|
-
function
|
|
12
|
+
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); }
|
|
11
13
|
|
|
12
|
-
function _iterableToArray(iter) { if (Symbol.iterator
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
13
15
|
|
|
14
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr))
|
|
16
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
|
+
|
|
18
|
+
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; }
|
|
15
19
|
|
|
16
20
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
21
|
|
|
18
22
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
19
23
|
|
|
20
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
25
|
+
|
|
26
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
21
27
|
|
|
22
|
-
function
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
|
|
30
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
31
|
+
|
|
32
|
+
function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
23
33
|
|
|
24
34
|
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
25
35
|
|
|
26
|
-
function
|
|
36
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
+
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
27
41
|
|
|
28
42
|
import React from "react";
|
|
29
43
|
import PropTypes from "prop-types";
|
|
30
|
-
import { Helpers, VictoryLabel, addEvents, LineSegment, PropTypes as CustomPropTypes, VictoryContainer, VictoryTheme, Box, Whisker, DefaultTransitions, CommonProps } from "victory-core";
|
|
44
|
+
import { Helpers, VictoryLabel, addEvents, LineSegment, PropTypes as CustomPropTypes, VictoryContainer, VictoryTheme, Box, Whisker, DefaultTransitions, CommonProps, UserProps } from "victory-core";
|
|
31
45
|
import { getDomain, getData, getBaseProps } from "./helper-methods";
|
|
32
46
|
var fallbackProps = {
|
|
33
47
|
width: 450,
|
|
@@ -81,15 +95,15 @@ var options = {
|
|
|
81
95
|
}]
|
|
82
96
|
};
|
|
83
97
|
|
|
84
|
-
var VictoryBoxPlot =
|
|
85
|
-
/*#__PURE__*/
|
|
86
|
-
function (_React$Component) {
|
|
98
|
+
var VictoryBoxPlot = /*#__PURE__*/function (_React$Component) {
|
|
87
99
|
_inherits(VictoryBoxPlot, _React$Component);
|
|
88
100
|
|
|
101
|
+
var _super = _createSuper(VictoryBoxPlot);
|
|
102
|
+
|
|
89
103
|
function VictoryBoxPlot() {
|
|
90
104
|
_classCallCheck(this, VictoryBoxPlot);
|
|
91
105
|
|
|
92
|
-
return
|
|
106
|
+
return _super.apply(this, arguments);
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
_createClass(VictoryBoxPlot, [{
|
|
@@ -106,7 +120,7 @@ function (_React$Component) {
|
|
|
106
120
|
var componentProps = _this.getComponentProps(baseComponent, type, index);
|
|
107
121
|
|
|
108
122
|
if (_this.shouldRenderDatum(componentProps.datum)) {
|
|
109
|
-
validDataComponents.push(React.cloneElement(baseComponent, componentProps));
|
|
123
|
+
validDataComponents.push( /*#__PURE__*/React.cloneElement(baseComponent, componentProps));
|
|
110
124
|
}
|
|
111
125
|
|
|
112
126
|
return validDataComponents;
|
|
@@ -121,7 +135,7 @@ function (_React$Component) {
|
|
|
121
135
|
var labelProps = _this.getComponentProps(baseComponent, name, index);
|
|
122
136
|
|
|
123
137
|
if (labelProps.text !== undefined && labelProps.text !== null) {
|
|
124
|
-
return React.cloneElement(baseComponent, labelProps);
|
|
138
|
+
return /*#__PURE__*/React.cloneElement(baseComponent, labelProps);
|
|
125
139
|
}
|
|
126
140
|
|
|
127
141
|
return undefined;
|
|
@@ -130,8 +144,7 @@ function (_React$Component) {
|
|
|
130
144
|
return components.filter(Boolean);
|
|
131
145
|
}));
|
|
132
146
|
|
|
133
|
-
var children = _toConsumableArray(dataComponents)
|
|
134
|
-
|
|
147
|
+
var children = [].concat(_toConsumableArray(dataComponents), _toConsumableArray(labelComponents));
|
|
135
148
|
return this.renderContainer(props.groupComponent, children);
|
|
136
149
|
} // Overridden in native versions
|
|
137
150
|
|
|
@@ -160,148 +173,109 @@ function (_React$Component) {
|
|
|
160
173
|
}
|
|
161
174
|
|
|
162
175
|
var children = this.renderBoxPlot(props);
|
|
163
|
-
|
|
176
|
+
var container = /*#__PURE__*/React.cloneElement(props.containerComponent, UserProps.getSafeUserProps(props));
|
|
177
|
+
return props.standalone ? this.renderContainer(container, children) : children;
|
|
164
178
|
}
|
|
165
179
|
}]);
|
|
166
180
|
|
|
167
181
|
return VictoryBoxPlot;
|
|
168
182
|
}(React.Component);
|
|
169
183
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
_defineProperty(VictoryBoxPlot, "animationWhitelist", ["data", "domain", "height", "padding", "style", "width"]);
|
|
185
|
+
|
|
186
|
+
_defineProperty(VictoryBoxPlot, "displayName", "VictoryBoxPlot");
|
|
187
|
+
|
|
188
|
+
_defineProperty(VictoryBoxPlot, "role", "boxplot");
|
|
189
|
+
|
|
190
|
+
_defineProperty(VictoryBoxPlot, "defaultTransitions", DefaultTransitions.discreteTransitions());
|
|
191
|
+
|
|
192
|
+
_defineProperty(VictoryBoxPlot, "propTypes", _objectSpread(_objectSpread(_objectSpread({}, CommonProps.baseProps), CommonProps.dataProps), {}, {
|
|
193
|
+
boxWidth: PropTypes.number,
|
|
194
|
+
events: PropTypes.arrayOf(PropTypes.shape({
|
|
195
|
+
target: PropTypes.oneOf(["max", "maxLabels", "median", "medianLabels", "min", "minLabels", "q1", "q1Labels", "q3", "q3Labels", "parent"]),
|
|
196
|
+
eventKey: PropTypes.oneOfType([PropTypes.array, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string]),
|
|
197
|
+
eventHandlers: PropTypes.object
|
|
198
|
+
})),
|
|
199
|
+
horizontal: PropTypes.bool,
|
|
200
|
+
labelOrientation: PropTypes.oneOfType([PropTypes.oneOf(["top", "bottom", "left", "right"]), PropTypes.shape({
|
|
201
|
+
q1: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
202
|
+
q3: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
203
|
+
min: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
204
|
+
max: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
205
|
+
median: PropTypes.oneOf(["top", "bottom", "left", "right"])
|
|
206
|
+
})]),
|
|
207
|
+
labels: PropTypes.bool,
|
|
208
|
+
max: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
209
|
+
maxComponent: PropTypes.element,
|
|
210
|
+
maxLabelComponent: PropTypes.element,
|
|
211
|
+
maxLabels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
212
|
+
median: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
213
|
+
medianComponent: PropTypes.element,
|
|
214
|
+
medianLabelComponent: PropTypes.element,
|
|
215
|
+
medianLabels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
216
|
+
min: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
217
|
+
minComponent: PropTypes.element,
|
|
218
|
+
minLabelComponent: PropTypes.element,
|
|
219
|
+
minLabels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
220
|
+
q1: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
221
|
+
q1Component: PropTypes.element,
|
|
222
|
+
q1LabelComponent: PropTypes.element,
|
|
223
|
+
q1Labels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
224
|
+
q3: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
225
|
+
q3Component: PropTypes.element,
|
|
226
|
+
q3LabelComponent: PropTypes.element,
|
|
227
|
+
q3Labels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
228
|
+
style: PropTypes.shape({
|
|
229
|
+
boxes: PropTypes.object,
|
|
230
|
+
labels: PropTypes.object,
|
|
231
|
+
parent: PropTypes.object,
|
|
232
|
+
max: PropTypes.object,
|
|
233
|
+
maxLabels: PropTypes.object,
|
|
234
|
+
median: PropTypes.object,
|
|
235
|
+
medianLabels: PropTypes.object,
|
|
236
|
+
min: PropTypes.object,
|
|
237
|
+
minLabels: PropTypes.object,
|
|
238
|
+
q1: PropTypes.object,
|
|
239
|
+
q1Labels: PropTypes.object,
|
|
240
|
+
q3: PropTypes.object,
|
|
241
|
+
q3Labels: PropTypes.object,
|
|
242
|
+
whiskers: PropTypes.object
|
|
243
|
+
}),
|
|
244
|
+
whiskerWidth: PropTypes.number
|
|
245
|
+
}));
|
|
246
|
+
|
|
247
|
+
_defineProperty(VictoryBoxPlot, "defaultProps", {
|
|
248
|
+
containerComponent: /*#__PURE__*/React.createElement(VictoryContainer, null),
|
|
249
|
+
data: defaultData,
|
|
250
|
+
dataComponent: /*#__PURE__*/React.createElement(Box, null),
|
|
251
|
+
groupComponent: /*#__PURE__*/React.createElement("g", {
|
|
252
|
+
role: "presentation"
|
|
253
|
+
}),
|
|
254
|
+
maxComponent: /*#__PURE__*/React.createElement(Whisker, null),
|
|
255
|
+
maxLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, null),
|
|
256
|
+
medianComponent: /*#__PURE__*/React.createElement(LineSegment, null),
|
|
257
|
+
medianLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, null),
|
|
258
|
+
minComponent: /*#__PURE__*/React.createElement(Whisker, null),
|
|
259
|
+
minLabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, null),
|
|
260
|
+
q1Component: /*#__PURE__*/React.createElement(Box, null),
|
|
261
|
+
q1LabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, null),
|
|
262
|
+
q3Component: /*#__PURE__*/React.createElement(Box, null),
|
|
263
|
+
q3LabelComponent: /*#__PURE__*/React.createElement(VictoryLabel, null),
|
|
264
|
+
samples: 50,
|
|
265
|
+
sortKey: "x",
|
|
266
|
+
sortOrder: "ascending",
|
|
267
|
+
standalone: true,
|
|
268
|
+
theme: VictoryTheme.grayscale
|
|
187
269
|
});
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
configurable: true,
|
|
196
|
-
enumerable: true,
|
|
197
|
-
writable: true,
|
|
198
|
-
value: _objectSpread({}, CommonProps.baseProps, CommonProps.dataProps, {
|
|
199
|
-
boxWidth: PropTypes.number,
|
|
200
|
-
events: PropTypes.arrayOf(PropTypes.shape({
|
|
201
|
-
target: PropTypes.oneOf(["max", "maxLabels", "median", "medianLabels", "min", "minLabels", "q1", "q1Labels", "q3", "q3Labels", "parent"]),
|
|
202
|
-
eventKey: PropTypes.oneOfType([PropTypes.array, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string]),
|
|
203
|
-
eventHandlers: PropTypes.object
|
|
204
|
-
})),
|
|
205
|
-
horizontal: PropTypes.bool,
|
|
206
|
-
labelOrientation: PropTypes.oneOfType([PropTypes.oneOf(["top", "bottom", "left", "right"]), PropTypes.shape({
|
|
207
|
-
q1: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
208
|
-
q3: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
209
|
-
min: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
210
|
-
max: PropTypes.oneOf(["top", "bottom", "left", "right"]),
|
|
211
|
-
median: PropTypes.oneOf(["top", "bottom", "left", "right"])
|
|
212
|
-
})]),
|
|
213
|
-
labels: PropTypes.bool,
|
|
214
|
-
max: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
215
|
-
maxComponent: PropTypes.element,
|
|
216
|
-
maxLabelComponent: PropTypes.element,
|
|
217
|
-
maxLabels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
218
|
-
median: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
219
|
-
medianComponent: PropTypes.element,
|
|
220
|
-
medianLabelComponent: PropTypes.element,
|
|
221
|
-
medianLabels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
222
|
-
min: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
223
|
-
minComponent: PropTypes.element,
|
|
224
|
-
minLabelComponent: PropTypes.element,
|
|
225
|
-
minLabels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
226
|
-
q1: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
227
|
-
q1Component: PropTypes.element,
|
|
228
|
-
q1LabelComponent: PropTypes.element,
|
|
229
|
-
q1Labels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
230
|
-
q3: PropTypes.oneOfType([PropTypes.func, CustomPropTypes.allOfType([CustomPropTypes.integer, CustomPropTypes.nonNegative]), PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),
|
|
231
|
-
q3Component: PropTypes.element,
|
|
232
|
-
q3LabelComponent: PropTypes.element,
|
|
233
|
-
q3Labels: PropTypes.oneOfType([PropTypes.func, PropTypes.array, PropTypes.bool]),
|
|
234
|
-
style: PropTypes.shape({
|
|
235
|
-
boxes: PropTypes.object,
|
|
236
|
-
labels: PropTypes.object,
|
|
237
|
-
parent: PropTypes.object,
|
|
238
|
-
max: PropTypes.object,
|
|
239
|
-
maxLabels: PropTypes.object,
|
|
240
|
-
median: PropTypes.object,
|
|
241
|
-
medianLabels: PropTypes.object,
|
|
242
|
-
min: PropTypes.object,
|
|
243
|
-
minLabels: PropTypes.object,
|
|
244
|
-
q1: PropTypes.object,
|
|
245
|
-
q1Labels: PropTypes.object,
|
|
246
|
-
q3: PropTypes.object,
|
|
247
|
-
q3Labels: PropTypes.object,
|
|
248
|
-
whiskers: PropTypes.object
|
|
249
|
-
}),
|
|
250
|
-
whiskerWidth: PropTypes.number
|
|
251
|
-
})
|
|
252
|
-
});
|
|
253
|
-
Object.defineProperty(VictoryBoxPlot, "defaultProps", {
|
|
254
|
-
configurable: true,
|
|
255
|
-
enumerable: true,
|
|
256
|
-
writable: true,
|
|
257
|
-
value: {
|
|
258
|
-
containerComponent: React.createElement(VictoryContainer, null),
|
|
259
|
-
data: defaultData,
|
|
260
|
-
dataComponent: React.createElement(Box, null),
|
|
261
|
-
groupComponent: React.createElement("g", {
|
|
262
|
-
role: "presentation"
|
|
263
|
-
}),
|
|
264
|
-
maxComponent: React.createElement(Whisker, null),
|
|
265
|
-
maxLabelComponent: React.createElement(VictoryLabel, null),
|
|
266
|
-
medianComponent: React.createElement(LineSegment, null),
|
|
267
|
-
medianLabelComponent: React.createElement(VictoryLabel, null),
|
|
268
|
-
minComponent: React.createElement(Whisker, null),
|
|
269
|
-
minLabelComponent: React.createElement(VictoryLabel, null),
|
|
270
|
-
q1Component: React.createElement(Box, null),
|
|
271
|
-
q1LabelComponent: React.createElement(VictoryLabel, null),
|
|
272
|
-
q3Component: React.createElement(Box, null),
|
|
273
|
-
q3LabelComponent: React.createElement(VictoryLabel, null),
|
|
274
|
-
samples: 50,
|
|
275
|
-
sortKey: "x",
|
|
276
|
-
sortOrder: "ascending",
|
|
277
|
-
standalone: true,
|
|
278
|
-
theme: VictoryTheme.grayscale
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
Object.defineProperty(VictoryBoxPlot, "getDomain", {
|
|
282
|
-
configurable: true,
|
|
283
|
-
enumerable: true,
|
|
284
|
-
writable: true,
|
|
285
|
-
value: getDomain
|
|
286
|
-
});
|
|
287
|
-
Object.defineProperty(VictoryBoxPlot, "getData", {
|
|
288
|
-
configurable: true,
|
|
289
|
-
enumerable: true,
|
|
290
|
-
writable: true,
|
|
291
|
-
value: getData
|
|
292
|
-
});
|
|
293
|
-
Object.defineProperty(VictoryBoxPlot, "getBaseProps", {
|
|
294
|
-
configurable: true,
|
|
295
|
-
enumerable: true,
|
|
296
|
-
writable: true,
|
|
297
|
-
value: function (props) {
|
|
298
|
-
return getBaseProps(props, fallbackProps);
|
|
299
|
-
}
|
|
300
|
-
});
|
|
301
|
-
Object.defineProperty(VictoryBoxPlot, "expectedComponents", {
|
|
302
|
-
configurable: true,
|
|
303
|
-
enumerable: true,
|
|
304
|
-
writable: true,
|
|
305
|
-
value: ["maxComponent", "maxLabelComponent", "medianComponent", "medianLabelComponent", "minComponent", "minLabelComponent", "q1Component", "q1LabelComponent", "q3Component", "q3LabelComponent", "groupComponent", "containerComponent"]
|
|
270
|
+
|
|
271
|
+
_defineProperty(VictoryBoxPlot, "getDomain", getDomain);
|
|
272
|
+
|
|
273
|
+
_defineProperty(VictoryBoxPlot, "getData", getData);
|
|
274
|
+
|
|
275
|
+
_defineProperty(VictoryBoxPlot, "getBaseProps", function (props) {
|
|
276
|
+
return getBaseProps(props, fallbackProps);
|
|
306
277
|
});
|
|
278
|
+
|
|
279
|
+
_defineProperty(VictoryBoxPlot, "expectedComponents", ["maxComponent", "maxLabelComponent", "medianComponent", "medianLabelComponent", "minComponent", "minLabelComponent", "q1Component", "q1LabelComponent", "q3Component", "q3LabelComponent", "groupComponent", "containerComponent"]);
|
|
280
|
+
|
|
307
281
|
export default addEvents(VictoryBoxPlot, options);
|
package/lib/helper-methods.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.getDomain = exports.getData = exports.getBaseProps = void 0;
|
|
7
7
|
|
|
8
8
|
var _isNil2 = _interopRequireDefault(require("lodash/isNil"));
|
|
9
9
|
|
|
@@ -23,7 +23,7 @@ var _orderBy2 = _interopRequireDefault(require("lodash/orderBy"));
|
|
|
23
23
|
|
|
24
24
|
var _victoryCore = require("victory-core");
|
|
25
25
|
|
|
26
|
-
var _d3Array = require("d3-array");
|
|
26
|
+
var _d3Array = require("victory-vendor/d3-array");
|
|
27
27
|
|
|
28
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
29
|
|