gifted-charts-core 0.0.33 → 0.0.34

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.33",
3
+ "version": "0.0.34",
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": [
@@ -215,7 +215,9 @@ export var useBarChart = function (props) {
215
215
  ? !!responderActive
216
216
  : true
217
217
  : false);
218
- var yAxisExtraHeightAtTop = (_39 = props.yAxisExtraHeight) !== null && _39 !== void 0 ? _39 : containerHeight / 20;
218
+ var yAxisExtraHeightAtTop = props.trimYAxisAtTop
219
+ ? 0
220
+ : (_39 = props.yAxisExtraHeight) !== null && _39 !== void 0 ? _39 : containerHeight / 20;
219
221
  var barInnerComponent = props.barInnerComponent;
220
222
  useEffect(function () {
221
223
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
@@ -333,7 +333,9 @@ export const useBarChart = (props: extendedBarChartPropsType) => {
333
333
  : true
334
334
  : false)
335
335
 
336
- const yAxisExtraHeightAtTop = props.yAxisExtraHeight ?? containerHeight / 20
336
+ const yAxisExtraHeightAtTop = props.trimYAxisAtTop
337
+ ? 0
338
+ : props.yAxisExtraHeight ?? containerHeight / 20
337
339
 
338
340
  const barInnerComponent = props.barInnerComponent
339
341
 
@@ -347,7 +347,9 @@ export var useLineChart = function (props) {
347
347
  showArrow: (_231 = (_230 = props.secondaryLineConfig) === null || _230 === void 0 ? void 0 : _230.showArrow) !== null && _231 !== void 0 ? _231 : props.showArrows,
348
348
  arrowConfig: (_233 = (_232 = props.secondaryLineConfig) === null || _232 === void 0 ? void 0 : _232.arrowConfig) !== null && _233 !== void 0 ? _233 : props.arrowConfig
349
349
  };
350
- var yAxisExtraHeightAtTop = (_234 = props.yAxisExtraHeight) !== null && _234 !== void 0 ? _234 : containerHeight / 20;
350
+ var yAxisExtraHeightAtTop = props.trimYAxisAtTop
351
+ ? 0
352
+ : (_234 = props.yAxisExtraHeight) !== null && _234 !== void 0 ? _234 : containerHeight / 20;
351
353
  var addLeadingAndTrailingPathForAreaFill = function (initialPath, value, dataLength) {
352
354
  return ('M ' +
353
355
  initialSpacing +
@@ -638,7 +638,10 @@ export const useLineChart = (props: extendedLineChartPropsType) => {
638
638
  showArrow: props.secondaryLineConfig?.showArrow ?? props.showArrows,
639
639
  arrowConfig: props.secondaryLineConfig?.arrowConfig ?? props.arrowConfig
640
640
  }
641
- const yAxisExtraHeightAtTop = props.yAxisExtraHeight ?? containerHeight / 20
641
+
642
+ const yAxisExtraHeightAtTop = props.trimYAxisAtTop
643
+ ? 0
644
+ : props.yAxisExtraHeight ?? containerHeight / 20
642
645
 
643
646
  const addLeadingAndTrailingPathForAreaFill = (
644
647
  initialPath: string,