victory-chart 36.3.2 → 36.5.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-chart.js +19736 -20176
- package/dist/victory-chart.min.js +1 -1
- package/es/helper-methods.js +9 -7
- package/es/victory-chart.js +28 -22
- package/lib/helper-methods.js +11 -7
- package/lib/victory-chart.js +28 -22
- package/package.json +9 -9
- package/src/helper-methods.js +0 -1
- package/src/victory-chart.js +18 -12
package/es/helper-methods.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import _assign from "lodash/assign";
|
|
2
2
|
import _defaults from "lodash/defaults";
|
|
3
3
|
|
|
4
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
5
5
|
|
|
6
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
|
6
|
+
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."); }
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
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); }
|
|
9
9
|
|
|
10
|
-
function
|
|
10
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
13
15
|
|
|
14
16
|
/* eslint-disable no-use-before-define */
|
|
15
17
|
import React from "react";
|
|
@@ -57,7 +59,7 @@ export function getBackgroundWithProps(props, calculatedProps) {
|
|
|
57
59
|
key: "".concat(parentName, "-background"),
|
|
58
60
|
width: width
|
|
59
61
|
};
|
|
60
|
-
return React.cloneElement(backgroundElement, _defaults({}, backgroundElement.props, backgroundProps));
|
|
62
|
+
return /*#__PURE__*/React.cloneElement(backgroundElement, _defaults({}, backgroundElement.props, backgroundProps));
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
function getChildProps(child, props, calculatedProps) {
|
|
@@ -171,7 +173,7 @@ export function getChildren(props, childComponents, calculatedProps) {
|
|
|
171
173
|
standalone: false
|
|
172
174
|
}, childProps);
|
|
173
175
|
|
|
174
|
-
return React.cloneElement(child, newProps);
|
|
176
|
+
return /*#__PURE__*/React.cloneElement(child, newProps);
|
|
175
177
|
});
|
|
176
178
|
}
|
|
177
179
|
export var getChildComponents = function (props, defaultAxes) {
|
package/es/victory-chart.js
CHANGED
|
@@ -2,7 +2,9 @@ import _isEmpty from "lodash/isEmpty";
|
|
|
2
2
|
import _assign from "lodash/assign";
|
|
3
3
|
import _defaults from "lodash/defaults";
|
|
4
4
|
|
|
5
|
-
function
|
|
5
|
+
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; }
|
|
6
|
+
|
|
7
|
+
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; }
|
|
6
8
|
|
|
7
9
|
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; }
|
|
8
10
|
|
|
@@ -30,7 +32,8 @@ var VictoryChart = function (initialProps) {
|
|
|
30
32
|
|
|
31
33
|
var props = getProps(initialProps);
|
|
32
34
|
var modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
|
|
33
|
-
var
|
|
35
|
+
var desc = modifiedProps.desc,
|
|
36
|
+
eventKey = modifiedProps.eventKey,
|
|
34
37
|
containerComponent = modifiedProps.containerComponent,
|
|
35
38
|
standalone = modifiedProps.standalone,
|
|
36
39
|
groupComponent = modifiedProps.groupComponent,
|
|
@@ -39,7 +42,8 @@ var VictoryChart = function (initialProps) {
|
|
|
39
42
|
height = modifiedProps.height,
|
|
40
43
|
theme = modifiedProps.theme,
|
|
41
44
|
polar = modifiedProps.polar,
|
|
42
|
-
name = modifiedProps.name
|
|
45
|
+
name = modifiedProps.name,
|
|
46
|
+
title = modifiedProps.title;
|
|
43
47
|
var axes = props.polar ? modifiedProps.defaultPolarAxes : modifiedProps.defaultAxes;
|
|
44
48
|
var childComponents = React.useMemo(function () {
|
|
45
49
|
return getChildComponents(modifiedProps, axes);
|
|
@@ -60,7 +64,7 @@ var VictoryChart = function (initialProps) {
|
|
|
60
64
|
animate: getAnimationProps(props, child, index, "victory chart")
|
|
61
65
|
}, child.props);
|
|
62
66
|
|
|
63
|
-
return React.cloneElement(child, childProps);
|
|
67
|
+
return /*#__PURE__*/React.cloneElement(child, childProps);
|
|
64
68
|
});
|
|
65
69
|
|
|
66
70
|
if (props.style && props.style.background) {
|
|
@@ -73,28 +77,30 @@ var VictoryChart = function (initialProps) {
|
|
|
73
77
|
var containerProps = React.useMemo(function () {
|
|
74
78
|
if (standalone) {
|
|
75
79
|
return {
|
|
80
|
+
desc: desc,
|
|
76
81
|
domain: domain,
|
|
77
|
-
scale: scale,
|
|
78
82
|
width: width,
|
|
79
83
|
height: height,
|
|
80
|
-
standalone: standalone,
|
|
81
|
-
theme: theme,
|
|
82
|
-
style: style.parent,
|
|
83
84
|
horizontal: horizontal,
|
|
84
85
|
name: name,
|
|
86
|
+
origin: polar ? origin : undefined,
|
|
85
87
|
polar: polar,
|
|
86
88
|
radius: radius,
|
|
87
|
-
|
|
89
|
+
theme: theme,
|
|
90
|
+
title: title,
|
|
91
|
+
scale: scale,
|
|
92
|
+
standalone: standalone,
|
|
93
|
+
style: style.parent
|
|
88
94
|
};
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
return {};
|
|
92
|
-
}, [domain,
|
|
98
|
+
}, [desc, domain, height, horizontal, name, origin, polar, radius, scale, standalone, style, title, theme, width]);
|
|
93
99
|
var container = React.useMemo(function () {
|
|
94
100
|
if (standalone) {
|
|
95
101
|
var defaultContainerProps = _defaults({}, containerComponent.props, containerProps, UserProps.getSafeUserProps(initialProps));
|
|
96
102
|
|
|
97
|
-
return React.cloneElement(containerComponent, defaultContainerProps);
|
|
103
|
+
return /*#__PURE__*/React.cloneElement(containerComponent, defaultContainerProps);
|
|
98
104
|
}
|
|
99
105
|
|
|
100
106
|
return groupComponent;
|
|
@@ -113,7 +119,7 @@ var VictoryChart = function (initialProps) {
|
|
|
113
119
|
}, [setAnimationState, previousProps, initialProps]);
|
|
114
120
|
|
|
115
121
|
if (!_isEmpty(events)) {
|
|
116
|
-
return React.createElement(VictorySharedEvents, {
|
|
122
|
+
return /*#__PURE__*/React.createElement(VictorySharedEvents, {
|
|
117
123
|
container: container,
|
|
118
124
|
eventKey: eventKey,
|
|
119
125
|
events: events,
|
|
@@ -121,10 +127,10 @@ var VictoryChart = function (initialProps) {
|
|
|
121
127
|
}, newChildren);
|
|
122
128
|
}
|
|
123
129
|
|
|
124
|
-
return React.cloneElement(container, container.props, newChildren);
|
|
130
|
+
return /*#__PURE__*/React.cloneElement(container, container.props, newChildren);
|
|
125
131
|
};
|
|
126
132
|
|
|
127
|
-
VictoryChart.propTypes = _objectSpread({}, CommonProps.baseProps, {
|
|
133
|
+
VictoryChart.propTypes = _objectSpread(_objectSpread({}, CommonProps.baseProps), {}, {
|
|
128
134
|
backgroundComponent: PropTypes.element,
|
|
129
135
|
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
130
136
|
defaultAxes: PropTypes.shape({
|
|
@@ -141,25 +147,25 @@ VictoryChart.propTypes = _objectSpread({}, CommonProps.baseProps, {
|
|
|
141
147
|
startAngle: PropTypes.number
|
|
142
148
|
});
|
|
143
149
|
VictoryChart.defaultProps = {
|
|
144
|
-
backgroundComponent: React.createElement(Background, null),
|
|
145
|
-
containerComponent: React.createElement(VictoryContainer, null),
|
|
150
|
+
backgroundComponent: /*#__PURE__*/React.createElement(Background, null),
|
|
151
|
+
containerComponent: /*#__PURE__*/React.createElement(VictoryContainer, null),
|
|
146
152
|
defaultAxes: {
|
|
147
|
-
independent: React.createElement(VictoryAxis, null),
|
|
148
|
-
dependent: React.createElement(VictoryAxis, {
|
|
153
|
+
independent: /*#__PURE__*/React.createElement(VictoryAxis, null),
|
|
154
|
+
dependent: /*#__PURE__*/React.createElement(VictoryAxis, {
|
|
149
155
|
dependentAxis: true
|
|
150
156
|
})
|
|
151
157
|
},
|
|
152
158
|
defaultPolarAxes: {
|
|
153
|
-
independent: React.createElement(VictoryPolarAxis, null),
|
|
154
|
-
dependent: React.createElement(VictoryPolarAxis, {
|
|
159
|
+
independent: /*#__PURE__*/React.createElement(VictoryPolarAxis, null),
|
|
160
|
+
dependent: /*#__PURE__*/React.createElement(VictoryPolarAxis, {
|
|
155
161
|
dependentAxis: true
|
|
156
162
|
})
|
|
157
163
|
},
|
|
158
|
-
groupComponent: React.createElement("g", null),
|
|
164
|
+
groupComponent: /*#__PURE__*/React.createElement("g", null),
|
|
159
165
|
standalone: true,
|
|
160
166
|
theme: VictoryTheme.grayscale
|
|
161
167
|
};
|
|
162
|
-
var VictoryChartMemo = React.memo(VictoryChart, isEqual);
|
|
168
|
+
var VictoryChartMemo = /*#__PURE__*/React.memo(VictoryChart, isEqual);
|
|
163
169
|
VictoryChartMemo.displayName = "VictoryChart";
|
|
164
170
|
VictoryChartMemo.expectedComponents = ["groupComponent", "containerComponent"];
|
|
165
171
|
export default VictoryChartMemo;
|
package/lib/helper-methods.js
CHANGED
|
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.getBackgroundWithProps = getBackgroundWithProps;
|
|
7
7
|
exports.getCalculatedProps = getCalculatedProps;
|
|
8
|
-
exports.getChildren = getChildren;
|
|
9
8
|
exports.getChildComponents = void 0;
|
|
9
|
+
exports.getChildren = getChildren;
|
|
10
10
|
|
|
11
11
|
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
12
12
|
|
|
@@ -18,13 +18,17 @@ var _victoryCore = require("victory-core");
|
|
|
18
18
|
|
|
19
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
20
|
|
|
21
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
|
21
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
22
|
+
|
|
23
|
+
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."); }
|
|
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); }
|
|
22
26
|
|
|
23
|
-
function
|
|
27
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
24
28
|
|
|
25
|
-
function
|
|
29
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
26
30
|
|
|
27
|
-
function
|
|
31
|
+
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
32
|
|
|
29
33
|
var fallbackProps = {
|
|
30
34
|
width: 450,
|
|
@@ -69,7 +73,7 @@ function getBackgroundWithProps(props, calculatedProps) {
|
|
|
69
73
|
key: "".concat(parentName, "-background"),
|
|
70
74
|
width: width
|
|
71
75
|
};
|
|
72
|
-
return _react.default.cloneElement(backgroundElement, (0, _defaults2.default)({}, backgroundElement.props, backgroundProps));
|
|
76
|
+
return /*#__PURE__*/_react.default.cloneElement(backgroundElement, (0, _defaults2.default)({}, backgroundElement.props, backgroundProps));
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
function getChildProps(child, props, calculatedProps) {
|
|
@@ -187,7 +191,7 @@ function getChildren(props, childComponents, calculatedProps) {
|
|
|
187
191
|
key: "".concat(name, "-key-").concat(index),
|
|
188
192
|
standalone: false
|
|
189
193
|
}, childProps);
|
|
190
|
-
return _react.default.cloneElement(child, newProps);
|
|
194
|
+
return /*#__PURE__*/_react.default.cloneElement(child, newProps);
|
|
191
195
|
});
|
|
192
196
|
}
|
|
193
197
|
|
package/lib/victory-chart.js
CHANGED
|
@@ -29,7 +29,9 @@ var _reactFastCompare = _interopRequireDefault(require("react-fast-compare"));
|
|
|
29
29
|
|
|
30
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
31
|
|
|
32
|
-
function
|
|
32
|
+
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; }
|
|
33
|
+
|
|
34
|
+
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; }
|
|
33
35
|
|
|
34
36
|
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; }
|
|
35
37
|
|
|
@@ -51,7 +53,8 @@ var VictoryChart = function (initialProps) {
|
|
|
51
53
|
|
|
52
54
|
var modifiedProps = _victoryCore.Helpers.modifyProps(props, fallbackProps, role);
|
|
53
55
|
|
|
54
|
-
var
|
|
56
|
+
var desc = modifiedProps.desc,
|
|
57
|
+
eventKey = modifiedProps.eventKey,
|
|
55
58
|
containerComponent = modifiedProps.containerComponent,
|
|
56
59
|
standalone = modifiedProps.standalone,
|
|
57
60
|
groupComponent = modifiedProps.groupComponent,
|
|
@@ -60,7 +63,8 @@ var VictoryChart = function (initialProps) {
|
|
|
60
63
|
height = modifiedProps.height,
|
|
61
64
|
theme = modifiedProps.theme,
|
|
62
65
|
polar = modifiedProps.polar,
|
|
63
|
-
name = modifiedProps.name
|
|
66
|
+
name = modifiedProps.name,
|
|
67
|
+
title = modifiedProps.title;
|
|
64
68
|
var axes = props.polar ? modifiedProps.defaultPolarAxes : modifiedProps.defaultAxes;
|
|
65
69
|
|
|
66
70
|
var childComponents = _react.default.useMemo(function () {
|
|
@@ -84,7 +88,7 @@ var VictoryChart = function (initialProps) {
|
|
|
84
88
|
var childProps = (0, _assign2.default)({
|
|
85
89
|
animate: getAnimationProps(props, child, index, "victory chart")
|
|
86
90
|
}, child.props);
|
|
87
|
-
return _react.default.cloneElement(child, childProps);
|
|
91
|
+
return /*#__PURE__*/_react.default.cloneElement(child, childProps);
|
|
88
92
|
});
|
|
89
93
|
|
|
90
94
|
if (props.style && props.style.background) {
|
|
@@ -98,28 +102,30 @@ var VictoryChart = function (initialProps) {
|
|
|
98
102
|
var containerProps = _react.default.useMemo(function () {
|
|
99
103
|
if (standalone) {
|
|
100
104
|
return {
|
|
105
|
+
desc: desc,
|
|
101
106
|
domain: domain,
|
|
102
|
-
scale: scale,
|
|
103
107
|
width: width,
|
|
104
108
|
height: height,
|
|
105
|
-
standalone: standalone,
|
|
106
|
-
theme: theme,
|
|
107
|
-
style: style.parent,
|
|
108
109
|
horizontal: horizontal,
|
|
109
110
|
name: name,
|
|
111
|
+
origin: polar ? origin : undefined,
|
|
110
112
|
polar: polar,
|
|
111
113
|
radius: radius,
|
|
112
|
-
|
|
114
|
+
theme: theme,
|
|
115
|
+
title: title,
|
|
116
|
+
scale: scale,
|
|
117
|
+
standalone: standalone,
|
|
118
|
+
style: style.parent
|
|
113
119
|
};
|
|
114
120
|
}
|
|
115
121
|
|
|
116
122
|
return {};
|
|
117
|
-
}, [domain,
|
|
123
|
+
}, [desc, domain, height, horizontal, name, origin, polar, radius, scale, standalone, style, title, theme, width]);
|
|
118
124
|
|
|
119
125
|
var container = _react.default.useMemo(function () {
|
|
120
126
|
if (standalone) {
|
|
121
127
|
var defaultContainerProps = (0, _defaults2.default)({}, containerComponent.props, containerProps, _victoryCore.UserProps.getSafeUserProps(initialProps));
|
|
122
|
-
return _react.default.cloneElement(containerComponent, defaultContainerProps);
|
|
128
|
+
return /*#__PURE__*/_react.default.cloneElement(containerComponent, defaultContainerProps);
|
|
123
129
|
}
|
|
124
130
|
|
|
125
131
|
return groupComponent;
|
|
@@ -141,7 +147,7 @@ var VictoryChart = function (initialProps) {
|
|
|
141
147
|
}, [setAnimationState, previousProps, initialProps]);
|
|
142
148
|
|
|
143
149
|
if (!(0, _isEmpty2.default)(events)) {
|
|
144
|
-
return _react.default.createElement(_victorySharedEvents.VictorySharedEvents, {
|
|
150
|
+
return /*#__PURE__*/_react.default.createElement(_victorySharedEvents.VictorySharedEvents, {
|
|
145
151
|
container: container,
|
|
146
152
|
eventKey: eventKey,
|
|
147
153
|
events: events,
|
|
@@ -149,10 +155,10 @@ var VictoryChart = function (initialProps) {
|
|
|
149
155
|
}, newChildren);
|
|
150
156
|
}
|
|
151
157
|
|
|
152
|
-
return _react.default.cloneElement(container, container.props, newChildren);
|
|
158
|
+
return /*#__PURE__*/_react.default.cloneElement(container, container.props, newChildren);
|
|
153
159
|
};
|
|
154
160
|
|
|
155
|
-
VictoryChart.propTypes = _objectSpread({}, _victoryCore.CommonProps.baseProps, {
|
|
161
|
+
VictoryChart.propTypes = _objectSpread(_objectSpread({}, _victoryCore.CommonProps.baseProps), {}, {
|
|
156
162
|
backgroundComponent: _propTypes.default.element,
|
|
157
163
|
children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.node), _propTypes.default.node]),
|
|
158
164
|
defaultAxes: _propTypes.default.shape({
|
|
@@ -169,26 +175,26 @@ VictoryChart.propTypes = _objectSpread({}, _victoryCore.CommonProps.baseProps, {
|
|
|
169
175
|
startAngle: _propTypes.default.number
|
|
170
176
|
});
|
|
171
177
|
VictoryChart.defaultProps = {
|
|
172
|
-
backgroundComponent: _react.default.createElement(_victoryCore.Background, null),
|
|
173
|
-
containerComponent: _react.default.createElement(_victoryCore.VictoryContainer, null),
|
|
178
|
+
backgroundComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.Background, null),
|
|
179
|
+
containerComponent: /*#__PURE__*/_react.default.createElement(_victoryCore.VictoryContainer, null),
|
|
174
180
|
defaultAxes: {
|
|
175
|
-
independent: _react.default.createElement(_victoryAxis.VictoryAxis, null),
|
|
176
|
-
dependent: _react.default.createElement(_victoryAxis.VictoryAxis, {
|
|
181
|
+
independent: /*#__PURE__*/_react.default.createElement(_victoryAxis.VictoryAxis, null),
|
|
182
|
+
dependent: /*#__PURE__*/_react.default.createElement(_victoryAxis.VictoryAxis, {
|
|
177
183
|
dependentAxis: true
|
|
178
184
|
})
|
|
179
185
|
},
|
|
180
186
|
defaultPolarAxes: {
|
|
181
|
-
independent: _react.default.createElement(_victoryPolarAxis.VictoryPolarAxis, null),
|
|
182
|
-
dependent: _react.default.createElement(_victoryPolarAxis.VictoryPolarAxis, {
|
|
187
|
+
independent: /*#__PURE__*/_react.default.createElement(_victoryPolarAxis.VictoryPolarAxis, null),
|
|
188
|
+
dependent: /*#__PURE__*/_react.default.createElement(_victoryPolarAxis.VictoryPolarAxis, {
|
|
183
189
|
dependentAxis: true
|
|
184
190
|
})
|
|
185
191
|
},
|
|
186
|
-
groupComponent: _react.default.createElement("g", null),
|
|
192
|
+
groupComponent: /*#__PURE__*/_react.default.createElement("g", null),
|
|
187
193
|
standalone: true,
|
|
188
194
|
theme: _victoryCore.VictoryTheme.grayscale
|
|
189
195
|
};
|
|
190
196
|
|
|
191
|
-
var VictoryChartMemo = _react.default.memo(VictoryChart, _reactFastCompare.default);
|
|
197
|
+
var VictoryChartMemo = /*#__PURE__*/_react.default.memo(VictoryChart, _reactFastCompare.default);
|
|
192
198
|
|
|
193
199
|
VictoryChartMemo.displayName = "VictoryChart";
|
|
194
200
|
VictoryChartMemo.expectedComponents = ["groupComponent", "containerComponent"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-chart",
|
|
3
|
-
"version": "36.
|
|
3
|
+
"version": "36.5.0",
|
|
4
4
|
"description": "Chart Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"lodash": "^4.17.19",
|
|
23
|
-
"prop-types": "^15.
|
|
24
|
-
"react-fast-compare": "^2.0
|
|
25
|
-
"victory-axis": "^36.
|
|
26
|
-
"victory-core": "^36.
|
|
27
|
-
"victory-polar-axis": "^36.
|
|
28
|
-
"victory-shared-events": "^36.
|
|
23
|
+
"prop-types": "^15.8.1",
|
|
24
|
+
"react-fast-compare": "^3.2.0",
|
|
25
|
+
"victory-axis": "^36.5.0",
|
|
26
|
+
"victory-core": "^36.5.0",
|
|
27
|
+
"victory-polar-axis": "^36.5.0",
|
|
28
|
+
"victory-shared-events": "^36.5.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"react": "
|
|
31
|
+
"react": ">=16.6.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"version": "yarn run nps build-libs && nps build-dists"
|
|
35
35
|
},
|
|
36
36
|
"sideEffects": false,
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "7cecba921f751c3decc8215f7e866f51d11203c1"
|
|
38
38
|
}
|
package/src/helper-methods.js
CHANGED
package/src/victory-chart.js
CHANGED
|
@@ -37,6 +37,7 @@ const VictoryChart = (initialProps) => {
|
|
|
37
37
|
|
|
38
38
|
const modifiedProps = Helpers.modifyProps(props, fallbackProps, role);
|
|
39
39
|
const {
|
|
40
|
+
desc,
|
|
40
41
|
eventKey,
|
|
41
42
|
containerComponent,
|
|
42
43
|
standalone,
|
|
@@ -46,7 +47,8 @@ const VictoryChart = (initialProps) => {
|
|
|
46
47
|
height,
|
|
47
48
|
theme,
|
|
48
49
|
polar,
|
|
49
|
-
name
|
|
50
|
+
name,
|
|
51
|
+
title
|
|
50
52
|
} = modifiedProps;
|
|
51
53
|
|
|
52
54
|
const axes = props.polar
|
|
@@ -90,34 +92,38 @@ const VictoryChart = (initialProps) => {
|
|
|
90
92
|
const containerProps = React.useMemo(() => {
|
|
91
93
|
if (standalone) {
|
|
92
94
|
return {
|
|
95
|
+
desc,
|
|
93
96
|
domain,
|
|
94
|
-
scale,
|
|
95
97
|
width,
|
|
96
98
|
height,
|
|
97
|
-
standalone,
|
|
98
|
-
theme,
|
|
99
|
-
style: style.parent,
|
|
100
99
|
horizontal,
|
|
101
100
|
name,
|
|
101
|
+
origin: polar ? origin : undefined,
|
|
102
102
|
polar,
|
|
103
103
|
radius,
|
|
104
|
-
|
|
104
|
+
theme,
|
|
105
|
+
title,
|
|
106
|
+
scale,
|
|
107
|
+
standalone,
|
|
108
|
+
style: style.parent
|
|
105
109
|
};
|
|
106
110
|
}
|
|
107
111
|
return {};
|
|
108
112
|
}, [
|
|
113
|
+
desc,
|
|
109
114
|
domain,
|
|
110
|
-
scale,
|
|
111
|
-
width,
|
|
112
115
|
height,
|
|
113
|
-
standalone,
|
|
114
|
-
theme,
|
|
115
|
-
style,
|
|
116
116
|
horizontal,
|
|
117
117
|
name,
|
|
118
|
+
origin,
|
|
118
119
|
polar,
|
|
119
120
|
radius,
|
|
120
|
-
|
|
121
|
+
scale,
|
|
122
|
+
standalone,
|
|
123
|
+
style,
|
|
124
|
+
title,
|
|
125
|
+
theme,
|
|
126
|
+
width
|
|
121
127
|
]);
|
|
122
128
|
|
|
123
129
|
const container = React.useMemo(() => {
|