gifted-charts-core 0.1.38 → 0.1.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.
@@ -275,10 +275,10 @@ export var useLineChart = function (props) {
275
275
  var valuesRange = Math.max.apply(Math, __spreadArray([], __read(mergedPrimaryDataArrays.map(function (i) { return Math.max(i.value, 0); })), false)) - // find the largest +ve number
276
276
  Math.min.apply(// find the largest +ve number
277
277
  Math, __spreadArray([], __read(mergedPrimaryDataArrays.map(function (i) { return Math.max(i.value, 0); })), false)); // find the smallest +ve number
278
- var showFractionalValues = (_104 = props.showFractionalValues) !== null && _104 !== void 0 ? _104 : valuesRange <= 1;
278
+ var showFractionalValues = (_104 = props.showFractionalValues) !== null && _104 !== void 0 ? _104 : (isFinite(valuesRange) && valuesRange <= 1);
279
279
  var roundToDigits = (_105 = props.roundToDigits) !== null && _105 !== void 0 ? _105 : (showFractionalValues ? indexOfFirstNonZeroDigit(valuesRange) + 1 : 0);
280
280
  var _352 = computeMaxAndMinItems(mergedPrimaryDataArrays, roundToDigits, showFractionalValues), maxItem = _352.maxItem, minItem = _352.minItem;
281
- var maxValue = getMaxValue(props.maxValue, props.stepValue, noOfSections, maxItem);
281
+ var maxValue = getMaxValue(props.maxValue, props.stepValue, noOfSections, maxItem) || 10;
282
282
  var mostNegativeValue = (_106 = props.mostNegativeValue) !== null && _106 !== void 0 ? _106 : minItem;
283
283
  var overflowTop = ((_107 = props.overflowTop) !== null && _107 !== void 0 ? _107 : props.secondaryXAxis)
284
284
  ? AxesAndRulesDefaults.overflowTopWithSecondaryXAxis
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.1.38",
3
+ "version": "0.1.39",
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": [