gifted-charts-core 0.1.22 → 0.1.23

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.
@@ -883,7 +883,10 @@ export var getInterpolatedData = function (dataParam, showDataPointsForMissingVa
883
883
  // 4. None has valid value -> this is already handled in preprocessing
884
884
  var pre = data.slice(0, index);
885
885
  var post = data.slice(index + 1, n);
886
- var preValidIndex = pre.findLastIndex(function (item) { return typeof item.value === 'number'; });
886
+ var preValidIndex = pre
887
+ .slice()
888
+ .reverse()
889
+ .findIndex(function (item) { return typeof item.value === 'number'; });
887
890
  var postValidInd = post.findIndex(function (item) { return typeof item.value === 'number'; });
888
891
  var postValidIndex = postValidInd + index + 1;
889
892
  var count, step;
@@ -900,7 +903,10 @@ export var getInterpolatedData = function (dataParam, showDataPointsForMissingVa
900
903
  // 1. There's only 1 valid value in the pre -> this is already handled in preprocessing
901
904
  // 2. There are more than valid values in pre
902
905
  var secondPre = data.slice(0, preValidIndex);
903
- var secondPreIndex = secondPre.findLastIndex(function (item) { return typeof item.value === 'number'; });
906
+ var secondPreIndex = secondPre
907
+ .slice()
908
+ .reverse()
909
+ .findIndex(function (item) { return typeof item.value === 'number'; });
904
910
  count = preValidIndex - secondPreIndex;
905
911
  step = (data[secondPreIndex].value - data[preValidIndex].value) / count;
906
912
  data[index].value =
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Mathematical and logical utilities used by react-gifted-charts and react-native-gifted-charts",
5
5
  "main": "./dist/index.js",
6
6
  "files": [