victory-chart 36.8.4 → 36.8.5
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 +6 -0
- package/dist/victory-chart.js +871 -1241
- package/dist/victory-chart.min.js +1 -1
- package/es/helper-methods.js +2 -3
- package/es/victory-chart.js +1 -3
- package/lib/helper-methods.js +2 -4
- package/lib/victory-chart.js +1 -3
- package/package.json +5 -5
- package/src/helper-methods.tsx +11 -3
- package/src/victory-chart.tsx +2 -2
package/es/helper-methods.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _assign from "lodash/assign";
|
|
2
1
|
import _defaults from "lodash/defaults";
|
|
3
2
|
|
|
4
3
|
/* eslint-disable no-use-before-define */
|
|
@@ -93,10 +92,10 @@ export function getCalculatedProps(initialProps, childComponents) {
|
|
|
93
92
|
var categories = Wrapper.getCategories(props, childComponents, allStrings);
|
|
94
93
|
var stringMap = createStringMap(props, childComponents, allStrings);
|
|
95
94
|
var domain = {
|
|
96
|
-
x: getDomain(
|
|
95
|
+
x: getDomain(Object.assign({}, props, {
|
|
97
96
|
categories: categories
|
|
98
97
|
}), "x", childComponents),
|
|
99
|
-
y: getDomain(
|
|
98
|
+
y: getDomain(Object.assign({}, props, {
|
|
100
99
|
categories: categories
|
|
101
100
|
}), "y", childComponents)
|
|
102
101
|
};
|
package/es/victory-chart.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _isEmpty from "lodash/isEmpty";
|
|
2
|
-
import _assign from "lodash/assign";
|
|
3
2
|
import _defaults from "lodash/defaults";
|
|
4
3
|
|
|
5
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; }
|
|
@@ -81,10 +80,9 @@ var VictoryChartImpl = function (initialProps) {
|
|
|
81
80
|
var newChildren = React.useMemo(function () {
|
|
82
81
|
var children = getChildren(props, childComponents, calculatedProps);
|
|
83
82
|
var mappedChildren = children.map(function (child, index) {
|
|
84
|
-
var childProps =
|
|
83
|
+
var childProps = Object.assign({
|
|
85
84
|
animate: getAnimationProps(props, child, index)
|
|
86
85
|
}, child.props);
|
|
87
|
-
|
|
88
86
|
return /*#__PURE__*/React.cloneElement(child, childProps);
|
|
89
87
|
});
|
|
90
88
|
|
package/lib/helper-methods.js
CHANGED
|
@@ -8,8 +8,6 @@ exports.getCalculatedProps = getCalculatedProps;
|
|
|
8
8
|
exports.getChildComponents = void 0;
|
|
9
9
|
exports.getChildren = getChildren;
|
|
10
10
|
|
|
11
|
-
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
12
|
-
|
|
13
11
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
14
12
|
|
|
15
13
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -113,10 +111,10 @@ function getCalculatedProps(initialProps, childComponents) {
|
|
|
113
111
|
|
|
114
112
|
var stringMap = createStringMap(props, childComponents, allStrings);
|
|
115
113
|
var domain = {
|
|
116
|
-
x: getDomain(
|
|
114
|
+
x: getDomain(Object.assign({}, props, {
|
|
117
115
|
categories: categories
|
|
118
116
|
}), "x", childComponents),
|
|
119
|
-
y: getDomain(
|
|
117
|
+
y: getDomain(Object.assign({}, props, {
|
|
120
118
|
categories: categories
|
|
121
119
|
}), "y", childComponents)
|
|
122
120
|
};
|
package/lib/victory-chart.js
CHANGED
|
@@ -7,8 +7,6 @@ exports.VictoryChart = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
9
9
|
|
|
10
|
-
var _assign2 = _interopRequireDefault(require("lodash/assign"));
|
|
11
|
-
|
|
12
10
|
var _defaults2 = _interopRequireDefault(require("lodash/defaults"));
|
|
13
11
|
|
|
14
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
@@ -107,7 +105,7 @@ var VictoryChartImpl = function (initialProps) {
|
|
|
107
105
|
var newChildren = _react.default.useMemo(function () {
|
|
108
106
|
var children = (0, _helperMethods.getChildren)(props, childComponents, calculatedProps);
|
|
109
107
|
var mappedChildren = children.map(function (child, index) {
|
|
110
|
-
var childProps =
|
|
108
|
+
var childProps = Object.assign({
|
|
111
109
|
animate: getAnimationProps(props, child, index)
|
|
112
110
|
}, child.props);
|
|
113
111
|
return /*#__PURE__*/_react.default.cloneElement(child, childProps);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-chart",
|
|
3
|
-
"version": "36.8.
|
|
3
|
+
"version": "36.8.5",
|
|
4
4
|
"description": "Chart Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"prop-types": "^15.8.1",
|
|
25
25
|
"react-fast-compare": "^3.2.0",
|
|
26
|
-
"victory-axis": "^36.8.
|
|
27
|
-
"victory-core": "^36.8.
|
|
28
|
-
"victory-polar-axis": "^36.8.
|
|
29
|
-
"victory-shared-events": "^36.8.
|
|
26
|
+
"victory-axis": "^36.8.5",
|
|
27
|
+
"victory-core": "^36.8.5",
|
|
28
|
+
"victory-polar-axis": "^36.8.5",
|
|
29
|
+
"victory-shared-events": "^36.8.5"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": ">=16.6.0"
|
package/src/helper-methods.tsx
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { Helpers, Scale, Axis, Wrapper } from "victory-core";
|
|
5
|
-
import { defaults
|
|
5
|
+
import { defaults } from "lodash";
|
|
6
6
|
|
|
7
7
|
const fallbackProps = {
|
|
8
8
|
width: 450,
|
|
@@ -90,8 +90,16 @@ export function getCalculatedProps(initialProps, childComponents) {
|
|
|
90
90
|
const categories = Wrapper.getCategories(props, childComponents, allStrings);
|
|
91
91
|
const stringMap = createStringMap(props, childComponents, allStrings);
|
|
92
92
|
const domain = {
|
|
93
|
-
x: getDomain(
|
|
94
|
-
|
|
93
|
+
x: getDomain(
|
|
94
|
+
Object.assign({}, props, { categories }),
|
|
95
|
+
"x",
|
|
96
|
+
childComponents,
|
|
97
|
+
),
|
|
98
|
+
y: getDomain(
|
|
99
|
+
Object.assign({}, props, { categories }),
|
|
100
|
+
"y",
|
|
101
|
+
childComponents,
|
|
102
|
+
),
|
|
95
103
|
};
|
|
96
104
|
|
|
97
105
|
const range = {
|
package/src/victory-chart.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defaults,
|
|
1
|
+
import { defaults, isEmpty } from "lodash";
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import {
|
|
@@ -97,7 +97,7 @@ const VictoryChartImpl: React.FC<VictoryChartProps> = (initialProps) => {
|
|
|
97
97
|
const children = getChildren(props, childComponents, calculatedProps);
|
|
98
98
|
|
|
99
99
|
const mappedChildren = children.map((child, index) => {
|
|
100
|
-
const childProps = assign(
|
|
100
|
+
const childProps = Object.assign(
|
|
101
101
|
{ animate: getAnimationProps(props, child, index) },
|
|
102
102
|
child.props,
|
|
103
103
|
);
|