gifted-charts-core 0.1.41 → 0.1.42

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.
@@ -207,7 +207,10 @@ export var useBarChart = function (props) {
207
207
  var secondaryMaxValue = (_2 = (_1 = props.secondaryYAxis) === null || _1 === void 0 ? void 0 : _1.maxValue) !== null && _2 !== void 0 ? _2 : secondaryMaxAndMin.maxItem;
208
208
  var mostNegativeValue = getMostNegativeValue(props.mostNegativeValue, props.negativeStepValue, props.noOfSectionsBelowXAxis, maxAndMin.minItem);
209
209
  var stepValue = (_3 = props.stepValue) !== null && _3 !== void 0 ? _3 : maxValue / noOfSections;
210
- var noOfSectionsBelowXAxis = (_4 = props.noOfSectionsBelowXAxis) !== null && _4 !== void 0 ? _4 : Math.round(Math.ceil(-mostNegativeValue / (negativeStepValue !== null && negativeStepValue !== void 0 ? negativeStepValue : stepValue)));
210
+ var effectiveNegativeStepValue = negativeStepValue !== null && negativeStepValue !== void 0 ? negativeStepValue : stepValue;
211
+ var noOfSectionsBelowXAxis = (_4 = props.noOfSectionsBelowXAxis) !== null && _4 !== void 0 ? _4 : (effectiveNegativeStepValue
212
+ ? Math.round(Math.ceil(-mostNegativeValue / effectiveNegativeStepValue))
213
+ : 0);
211
214
  var showScrollIndicator = (_5 = props.showScrollIndicator) !== null && _5 !== void 0 ? _5 : BarDefaults.showScrollIndicator;
212
215
  var side = (_6 = props.side) !== null && _6 !== void 0 ? _6 : BarDefaults.side;
213
216
  var rotateLabel = (_7 = props.rotateLabel) !== null && _7 !== void 0 ? _7 : AxesAndRulesDefaults.rotateLabel;
@@ -127,9 +127,7 @@ export var useLineChart = function (props) {
127
127
  var animationDuration = (_t = props.animationDuration) !== null && _t !== void 0 ? _t : LineDefaults.animationDuration;
128
128
  var onDataChangeAnimationDuration = (_u = props.onDataChangeAnimationDuration) !== null && _u !== void 0 ? _u : 400;
129
129
  var animateTogether = (_v = props.animateTogether) !== null && _v !== void 0 ? _v : LineDefaults.animateTogether;
130
- var animateOnDataChange = yAxisOffset
131
- ? false
132
- : (_w = props.animateOnDataChange) !== null && _w !== void 0 ? _w : false;
130
+ var animateOnDataChange = (_w = props.animateOnDataChange) !== null && _w !== void 0 ? _w : false;
133
131
  var startIndex1 = (_y = (_x = props.startIndex1) !== null && _x !== void 0 ? _x : props.startIndex) !== null && _y !== void 0 ? _y : 0;
134
132
  var endIndex1;
135
133
  if (props.endIndex1 === undefined || props.endIndex1 === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.1.41",
3
+ "version": "0.1.42",
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": [