victory-stack 37.1.2 → 37.3.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 -0
- package/dist/victory-stack.js +279 -154
- package/dist/victory-stack.min.js +1 -1
- package/es/helper-methods.js +4 -1
- package/lib/helper-methods.js +4 -1
- package/package.json +3 -3
- package/src/helper-methods.tsx +7 -1
package/es/helper-methods.js
CHANGED
|
@@ -217,10 +217,13 @@ export function getChildren(initialProps, childComponents, calculatedProps) {
|
|
|
217
217
|
} = newCalculatedProps;
|
|
218
218
|
const childProps = getChildProps(props, newCalculatedProps);
|
|
219
219
|
const parentName = props.name || "stack";
|
|
220
|
+
const {
|
|
221
|
+
theme
|
|
222
|
+
} = props;
|
|
220
223
|
return children.map((child, index) => {
|
|
221
224
|
const role = child.type && child.type.role;
|
|
222
225
|
const data = datasets[index];
|
|
223
|
-
const style = Wrapper.getChildStyle(child, index, newCalculatedProps);
|
|
226
|
+
const style = Wrapper.getChildStyle(child, index, newCalculatedProps, theme);
|
|
224
227
|
const labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
|
|
225
228
|
const name = child.props.name || `${parentName}-${role}-${index}`;
|
|
226
229
|
return /*#__PURE__*/React.cloneElement(child, Object.assign({
|
package/lib/helper-methods.js
CHANGED
|
@@ -228,10 +228,13 @@ function getChildren(initialProps, childComponents, calculatedProps) {
|
|
|
228
228
|
} = newCalculatedProps;
|
|
229
229
|
const childProps = getChildProps(props, newCalculatedProps);
|
|
230
230
|
const parentName = props.name || "stack";
|
|
231
|
+
const {
|
|
232
|
+
theme
|
|
233
|
+
} = props;
|
|
231
234
|
return children.map((child, index) => {
|
|
232
235
|
const role = child.type && child.type.role;
|
|
233
236
|
const data = datasets[index];
|
|
234
|
-
const style = _victoryCore.Wrapper.getChildStyle(child, index, newCalculatedProps);
|
|
237
|
+
const style = _victoryCore.Wrapper.getChildStyle(child, index, newCalculatedProps, theme);
|
|
235
238
|
const labels = props.labels ? getLabels(props, datasets, index) : child.props.labels;
|
|
236
239
|
const name = child.props.name || `${parentName}-${role}-${index}`;
|
|
237
240
|
return /*#__PURE__*/_react.default.cloneElement(child, Object.assign({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "victory-stack",
|
|
3
|
-
"version": "37.
|
|
3
|
+
"version": "37.3.0",
|
|
4
4
|
"description": "Stack Layout Component for Victory",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"data visualization",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"lodash": "^4.17.19",
|
|
24
24
|
"react-fast-compare": "^3.2.0",
|
|
25
|
-
"victory-core": "37.
|
|
26
|
-
"victory-shared-events": "37.
|
|
25
|
+
"victory-core": "37.3.0",
|
|
26
|
+
"victory-shared-events": "37.3.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": ">=16.6.0"
|
package/src/helper-methods.tsx
CHANGED
|
@@ -242,10 +242,16 @@ export function getChildren(initialProps, childComponents, calculatedProps) {
|
|
|
242
242
|
const { datasets } = newCalculatedProps;
|
|
243
243
|
const childProps = getChildProps(props, newCalculatedProps);
|
|
244
244
|
const parentName = props.name || "stack";
|
|
245
|
+
const { theme } = props;
|
|
245
246
|
return children.map((child, index) => {
|
|
246
247
|
const role = child.type && child.type.role;
|
|
247
248
|
const data = datasets[index];
|
|
248
|
-
const style = Wrapper.getChildStyle(
|
|
249
|
+
const style = Wrapper.getChildStyle(
|
|
250
|
+
child,
|
|
251
|
+
index,
|
|
252
|
+
newCalculatedProps,
|
|
253
|
+
theme,
|
|
254
|
+
);
|
|
249
255
|
const labels = props.labels
|
|
250
256
|
? getLabels(props, datasets, index)
|
|
251
257
|
: child.props.labels;
|