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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "description": "Mathematical and logical utilities used by react-gifted-charts and react-native-gifted-charts",
5
5
  "main": "./src/index.js",
6
6
  "files": [
@@ -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.value = ((_a = item.value) !== null && _a !== void 0 ? _a : 0) - (yAxisOffset !== null && yAxisOffset !== void 0 ? yAxisOffset : 0);
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;
@@ -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.value = (item.value ?? 0) - (yAxisOffset ?? 0)
74
- return item
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])