gifted-charts-core 0.0.38 → 0.0.39
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/package.json +1 -1
- package/src/BarChart/index.js +1 -2
- package/src/BarChart/index.ts +4 -4
package/package.json
CHANGED
package/src/BarChart/index.js
CHANGED
|
@@ -55,8 +55,7 @@ export var useBarChart = function (props) {
|
|
|
55
55
|
if (yAxisOffset) {
|
|
56
56
|
return props.data.map(function (item) {
|
|
57
57
|
var _a;
|
|
58
|
-
item
|
|
59
|
-
return item;
|
|
58
|
+
return (__assign(__assign({}, item), { value: ((_a = item.value) !== null && _a !== void 0 ? _a : 0) - (yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0) }));
|
|
60
59
|
});
|
|
61
60
|
}
|
|
62
61
|
return props.data;
|
package/src/BarChart/index.ts
CHANGED
|
@@ -69,10 +69,10 @@ export const useBarChart = (props: extendedBarChartPropsType) => {
|
|
|
69
69
|
return []
|
|
70
70
|
}
|
|
71
71
|
if (yAxisOffset) {
|
|
72
|
-
return props.data.map((item) => {
|
|
73
|
-
item
|
|
74
|
-
|
|
75
|
-
})
|
|
72
|
+
return props.data.map((item) => ({
|
|
73
|
+
...item,
|
|
74
|
+
value: (item.value ?? 0) - (yAxisOffset ?? 0)
|
|
75
|
+
}))
|
|
76
76
|
}
|
|
77
77
|
return props.data
|
|
78
78
|
}, [yAxisOffset, props.data])
|