gifted-charts-core 0.1.32 → 0.1.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.
@@ -58,7 +58,7 @@ export declare const getPieChartMainProps: (props: PieChartMainProps) => {
58
58
  avoidOverlappingOfLabels: boolean;
59
59
  };
60
60
  externalLabelComponent: ((item?: pieDataItem, index?: number) => any) | undefined;
61
- getExternaLabelProperties: (item: pieDataItem, mx: number, my: number, cx: number, cy: number, prevSide: string, prevLabelComponentX: number) => {
61
+ getExternaLabelProperties: (item: pieDataItem, mx: number, my: number, cx: number, cy: number, prevSide: string, prevLabelComponentX: number, isLast?: boolean, wasFirstItemOnPole?: boolean) => {
62
62
  labelLineColor: string;
63
63
  labelLineThickness: number;
64
64
  labelComponentHeight: number;
@@ -144,7 +144,7 @@ export var getPieChartMainProps = function (props) {
144
144
  return pAcc + (acc - pAcc) / 2;
145
145
  });
146
146
  pData = __spreadArray([0], __read(pData), false);
147
- var getExternaLabelProperties = function (item, mx, my, cx, cy, prevSide, prevLabelComponentX) {
147
+ var getExternaLabelProperties = function (item, mx, my, cx, cy, prevSide, prevLabelComponentX, isLast, wasFirstItemOnPole) {
148
148
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
149
149
  if (!showExternalLabels)
150
150
  return emptyExternaLabelProperties;
@@ -188,7 +188,8 @@ export var getPieChartMainProps = function (props) {
188
188
  // In case both previous & current labels are at pole, then their labels might again overlap, to counter this, we vertically shift the current label
189
189
  if (labelLineConfig.avoidOverlappingOfLabels &&
190
190
  isOnPole &&
191
- Math.abs(prevLabelComponentX - labelComponentX) < 30) {
191
+ (Math.abs(prevLabelComponentX - labelComponentX) < 30 ||
192
+ (isLast && wasFirstItemOnPole))) {
192
193
  labelComponentY += outY > cy ? 20 : -20;
193
194
  outY += outY > cy ? 20 : -20;
194
195
  }
@@ -1,7 +1,7 @@
1
1
  import { AxesAndRulesDefaults } from '../../utils/constants';
2
2
  import { getLabelTextUtil } from '../../utils';
3
3
  export var getHorizSectionVals = function (props) {
4
- 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, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
4
+ 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, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14;
5
5
  var width = props.width, noOfSectionsBelowXAxis = props.noOfSectionsBelowXAxis, totalWidth = props.totalWidth, endSpacing = props.endSpacing, yAxisSide = props.yAxisSide, noOfSections = props.noOfSections, yAxisLabelWidth = props.yAxisLabelWidth, yAxisLabelContainerStyle = props.yAxisLabelContainerStyle, yAxisThickness = props.yAxisThickness, yAxisColor = props.yAxisColor, yAxisExtraHeight = props.yAxisExtraHeight, trimYAxisAtTop = props.trimYAxisAtTop, dashWidth = props.dashWidth, dashGap = props.dashGap, rulesType = props.rulesType, rulesThickness = props.rulesThickness, spacing = props.spacing, showYAxisIndices = props.showYAxisIndices, yAxisIndicesHeight = props.yAxisIndicesHeight, yAxisIndicesWidth = props.yAxisIndicesWidth, yAxisIndicesColor = props.yAxisIndicesColor, hideOrigin = props.hideOrigin, hideYAxisText = props.hideYAxisText, showFractionalValues = props.showFractionalValues, yAxisTextNumberOfLines = props.yAxisTextNumberOfLines, yAxisLabelPrefix = props.yAxisLabelPrefix, yAxisLabelSuffix = props.yAxisLabelSuffix, yAxisTextStyle = props.yAxisTextStyle, containerHeight = props.containerHeight, maxValue = props.maxValue, referenceLinesConfig = props.referenceLinesConfig, yAxisLabelTexts = props.yAxisLabelTexts, stepValue = props.stepValue, negativeStepValue = props.negativeStepValue, roundToDigits = props.roundToDigits, yAxisOffset = props.yAxisOffset, formatYLabel = props.formatYLabel, secondaryMaxItem = props.secondaryMaxItem, secondaryMinItem = props.secondaryMinItem, secondaryYAxis = props.secondaryYAxis, secondaryStepValue = props.secondaryStepValue, secondaryNegativeStepValue = props.secondaryNegativeStepValue, secondaryNoOfSectionsBelowXAxis = props.secondaryNoOfSectionsBelowXAxis;
6
6
  var yAxisExtraHeightAtTop = trimYAxisAtTop ? 0 : yAxisExtraHeight;
7
7
  /***********************************************************************************************************************************
@@ -29,23 +29,23 @@ export var getHorizSectionVals = function (props) {
29
29
  yAxisThickness: (_j = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisThickness) !== null && _j !== void 0 ? _j : yAxisThickness,
30
30
  yAxisColor: (_k = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisColor) !== null && _k !== void 0 ? _k : yAxisColor,
31
31
  yAxisLabelContainerStyle: (_l = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelContainerStyle) !== null && _l !== void 0 ? _l : yAxisLabelContainerStyle,
32
- yAxisLabelTexts: (_m = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelTexts) !== null && _m !== void 0 ? _m : yAxisLabelTexts,
33
- yAxisTextStyle: (_o = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisTextStyle) !== null && _o !== void 0 ? _o : yAxisTextStyle,
34
- yAxisTextNumberOfLines: (_p = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisTextNumberOfLines) !== null && _p !== void 0 ? _p : yAxisTextNumberOfLines,
35
- yAxisLabelWidth: (_q = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelWidth) !== null && _q !== void 0 ? _q : yAxisLabelWidth,
36
- hideYAxisText: (_r = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.hideYAxisText) !== null && _r !== void 0 ? _r : hideYAxisText,
37
- yAxisLabelPrefix: (_s = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelPrefix) !== null && _s !== void 0 ? _s : yAxisLabelPrefix,
38
- yAxisLabelSuffix: (_t = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelSuffix) !== null && _t !== void 0 ? _t : yAxisLabelSuffix,
39
- hideOrigin: (_u = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.hideOrigin) !== null && _u !== void 0 ? _u : hideOrigin,
32
+ yAxisLabelTexts: secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelTexts,
33
+ yAxisTextStyle: (_m = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisTextStyle) !== null && _m !== void 0 ? _m : yAxisTextStyle,
34
+ yAxisTextNumberOfLines: (_o = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisTextNumberOfLines) !== null && _o !== void 0 ? _o : yAxisTextNumberOfLines,
35
+ yAxisLabelWidth: (_p = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelWidth) !== null && _p !== void 0 ? _p : yAxisLabelWidth,
36
+ hideYAxisText: (_q = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.hideYAxisText) !== null && _q !== void 0 ? _q : hideYAxisText,
37
+ yAxisLabelPrefix: (_r = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelPrefix) !== null && _r !== void 0 ? _r : yAxisLabelPrefix,
38
+ yAxisLabelSuffix: (_s = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.yAxisLabelSuffix) !== null && _s !== void 0 ? _s : yAxisLabelSuffix,
39
+ hideOrigin: (_t = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.hideOrigin) !== null && _t !== void 0 ? _t : hideOrigin,
40
40
  formatYLabel: secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.formatYLabel
41
41
  };
42
42
  secondaryYAxisConfig.maxValue =
43
- (_v = secondaryYAxisConfig.maxValue) !== null && _v !== void 0 ? _v : (secondaryMaxItem || maxValue);
43
+ (_u = secondaryYAxisConfig.maxValue) !== null && _u !== void 0 ? _u : (secondaryMaxItem || maxValue);
44
44
  secondaryYAxisConfig.mostNegativeValue =
45
- (_w = secondaryYAxisConfig.mostNegativeValue) !== null && _w !== void 0 ? _w : secondaryMinItem;
45
+ (_v = secondaryYAxisConfig.mostNegativeValue) !== null && _v !== void 0 ? _v : secondaryMinItem;
46
46
  secondaryYAxisConfig.stepHeight =
47
47
  secondaryYAxisConfig.stepHeight ||
48
- containerHeight / ((_x = secondaryYAxisConfig.noOfSections) !== null && _x !== void 0 ? _x : noOfSections);
48
+ containerHeight / ((_w = secondaryYAxisConfig.noOfSections) !== null && _w !== void 0 ? _w : noOfSections);
49
49
  var horizSections = [];
50
50
  for (var i = 0; i <= noOfSections; i++) {
51
51
  var value = maxValue - stepValue * i;
@@ -54,7 +54,7 @@ export var getHorizSectionVals = function (props) {
54
54
  }
55
55
  horizSections.push({
56
56
  value: (yAxisLabelTexts === null || yAxisLabelTexts === void 0 ? void 0 : yAxisLabelTexts.length)
57
- ? (_y = yAxisLabelTexts[noOfSections + noOfSectionsBelowXAxis - i]) !== null && _y !== void 0 ? _y : value.toString()
57
+ ? (_x = yAxisLabelTexts[noOfSections + noOfSectionsBelowXAxis - i]) !== null && _x !== void 0 ? _x : value.toString()
58
58
  : value.toString()
59
59
  });
60
60
  }
@@ -67,22 +67,24 @@ export var getHorizSectionVals = function (props) {
67
67
  }
68
68
  horizSectionsBelow.push({
69
69
  value: props.yAxisLabelTexts
70
- ? (_z = props.yAxisLabelTexts[noOfSectionsBelowXAxis - i]) !== null && _z !== void 0 ? _z : value.toString()
70
+ ? (_y = props.yAxisLabelTexts[noOfSectionsBelowXAxis - i]) !== null && _y !== void 0 ? _y : value.toString()
71
71
  : value.toString()
72
72
  });
73
73
  }
74
74
  }
75
75
  var secondaryHorizSections = [];
76
76
  if (secondaryYAxis) {
77
- for (var i = 0; i <= ((_0 = secondaryYAxisConfig.noOfSections) !== null && _0 !== void 0 ? _0 : noOfSections); i++) {
77
+ for (var i = 0; i <= ((_z = secondaryYAxisConfig.noOfSections) !== null && _z !== void 0 ? _z : noOfSections); i++) {
78
78
  var value = secondaryYAxisConfig.stepValue * i;
79
79
  if (secondaryYAxisConfig.showFractionalValues ||
80
80
  secondaryYAxisConfig.roundToDigits) {
81
- value = parseFloat(value.toFixed((_1 = secondaryYAxisConfig.roundToDigits) !== null && _1 !== void 0 ? _1 : AxesAndRulesDefaults.roundToDigits));
81
+ value = parseFloat(value.toFixed((_0 = secondaryYAxisConfig.roundToDigits) !== null && _0 !== void 0 ? _0 : AxesAndRulesDefaults.roundToDigits));
82
82
  }
83
83
  secondaryHorizSections.push({
84
- value: ((_2 = secondaryYAxisConfig.yAxisLabelTexts) === null || _2 === void 0 ? void 0 : _2.length)
85
- ? (_3 = secondaryYAxisConfig.yAxisLabelTexts[i - noOfSectionsBelowXAxis - 1]) !== null && _3 !== void 0 ? _3 : value.toString()
84
+ value: ((_1 = secondaryYAxisConfig.yAxisLabelTexts) === null || _1 === void 0 ? void 0 : _1.length)
85
+ ? (_2 = secondaryYAxisConfig.yAxisLabelTexts[i + noOfSectionsBelowXAxis
86
+ // - noOfSectionsBelowXAxis - 1
87
+ ]) !== null && _2 !== void 0 ? _2 : value.toString()
86
88
  : value.toString()
87
89
  });
88
90
  }
@@ -94,11 +96,11 @@ export var getHorizSectionVals = function (props) {
94
96
  (i - secondaryYAxisConfig.noOfSectionsBelowXAxis - 1);
95
97
  if (secondaryYAxisConfig.showFractionalValues ||
96
98
  secondaryYAxisConfig.roundToDigits) {
97
- value = parseFloat(value.toFixed((_4 = secondaryYAxisConfig.roundToDigits) !== null && _4 !== void 0 ? _4 : AxesAndRulesDefaults.roundToDigits));
99
+ value = parseFloat(value.toFixed((_3 = secondaryYAxisConfig.roundToDigits) !== null && _3 !== void 0 ? _3 : AxesAndRulesDefaults.roundToDigits));
98
100
  }
99
101
  secondaryHorizSectionsBelow.push({
100
- value: ((_5 = secondaryYAxisConfig.yAxisLabelTexts) === null || _5 === void 0 ? void 0 : _5.length)
101
- ? (_6 = secondaryYAxisConfig.yAxisLabelTexts[i - 1]) !== null && _6 !== void 0 ? _6 : value.toString()
102
+ value: ((_4 = secondaryYAxisConfig.yAxisLabelTexts) === null || _4 === void 0 ? void 0 : _4.length)
103
+ ? (_5 = secondaryYAxisConfig.yAxisLabelTexts[i - 1]) !== null && _5 !== void 0 ? _5 : value.toString()
102
104
  : value.toString()
103
105
  });
104
106
  }
@@ -119,12 +121,12 @@ export var getHorizSectionVals = function (props) {
119
121
  };
120
122
  showReferenceLine1 = referenceLinesConfig.showReferenceLine1 || false;
121
123
  referenceLine1Position =
122
- (_7 = referenceLinesConfig.referenceLine1Position) !== null && _7 !== void 0 ? _7 : (referenceLinesConfig.referenceLine1Position || containerHeight / 2);
124
+ (_6 = referenceLinesConfig.referenceLine1Position) !== null && _6 !== void 0 ? _6 : (referenceLinesConfig.referenceLine1Position || containerHeight / 2);
123
125
  referenceLine1Config = referenceLinesConfig.referenceLine1Config
124
126
  ? {
125
127
  thickness: referenceLinesConfig.referenceLine1Config.thickness ||
126
128
  defaultReferenceConfig.thickness,
127
- width: (_8 = referenceLinesConfig.referenceLine1Config.width) !== null && _8 !== void 0 ? _8 : defaultReferenceConfig.width,
129
+ width: (_7 = referenceLinesConfig.referenceLine1Config.width) !== null && _7 !== void 0 ? _7 : defaultReferenceConfig.width,
128
130
  color: referenceLinesConfig.referenceLine1Config.color ||
129
131
  defaultReferenceConfig.color,
130
132
  type: referenceLinesConfig.referenceLine1Config.type ||
@@ -137,17 +139,17 @@ export var getHorizSectionVals = function (props) {
137
139
  defaultReferenceConfig.labelText,
138
140
  labelTextStyle: referenceLinesConfig.referenceLine1Config.labelTextStyle ||
139
141
  defaultReferenceConfig.labelTextStyle,
140
- zIndex: (_9 = referenceLinesConfig.referenceLine1Config.zIndex) !== null && _9 !== void 0 ? _9 : defaultReferenceConfig.zIndex
142
+ zIndex: (_8 = referenceLinesConfig.referenceLine1Config.zIndex) !== null && _8 !== void 0 ? _8 : defaultReferenceConfig.zIndex
141
143
  }
142
144
  : defaultReferenceConfig;
143
145
  showReferenceLine2 = referenceLinesConfig.showReferenceLine2 || false;
144
146
  referenceLine2Position =
145
- (_10 = referenceLinesConfig.referenceLine2Position) !== null && _10 !== void 0 ? _10 : (referenceLinesConfig.referenceLine2Position || (3 * containerHeight) / 2);
147
+ (_9 = referenceLinesConfig.referenceLine2Position) !== null && _9 !== void 0 ? _9 : (referenceLinesConfig.referenceLine2Position || (3 * containerHeight) / 2);
146
148
  referenceLine2Config = referenceLinesConfig.referenceLine2Config
147
149
  ? {
148
150
  thickness: referenceLinesConfig.referenceLine2Config.thickness ||
149
151
  defaultReferenceConfig.thickness,
150
- width: (_11 = referenceLinesConfig.referenceLine2Config.width) !== null && _11 !== void 0 ? _11 : defaultReferenceConfig.width,
152
+ width: (_10 = referenceLinesConfig.referenceLine2Config.width) !== null && _10 !== void 0 ? _10 : defaultReferenceConfig.width,
151
153
  color: referenceLinesConfig.referenceLine2Config.color ||
152
154
  defaultReferenceConfig.color,
153
155
  type: referenceLinesConfig.referenceLine2Config.type ||
@@ -160,17 +162,17 @@ export var getHorizSectionVals = function (props) {
160
162
  defaultReferenceConfig.labelText,
161
163
  labelTextStyle: referenceLinesConfig.referenceLine2Config.labelTextStyle ||
162
164
  defaultReferenceConfig.labelTextStyle,
163
- zIndex: (_12 = referenceLinesConfig.referenceLine2Config.zIndex) !== null && _12 !== void 0 ? _12 : defaultReferenceConfig.zIndex
165
+ zIndex: (_11 = referenceLinesConfig.referenceLine2Config.zIndex) !== null && _11 !== void 0 ? _11 : defaultReferenceConfig.zIndex
164
166
  }
165
167
  : defaultReferenceConfig;
166
168
  showReferenceLine3 = referenceLinesConfig.showReferenceLine3 || false;
167
169
  referenceLine3Position =
168
- (_13 = referenceLinesConfig.referenceLine3Position) !== null && _13 !== void 0 ? _13 : (referenceLinesConfig.referenceLine3Position || containerHeight / 3);
170
+ (_12 = referenceLinesConfig.referenceLine3Position) !== null && _12 !== void 0 ? _12 : (referenceLinesConfig.referenceLine3Position || containerHeight / 3);
169
171
  referenceLine3Config = referenceLinesConfig.referenceLine3Config
170
172
  ? {
171
173
  thickness: referenceLinesConfig.referenceLine3Config.thickness ||
172
174
  defaultReferenceConfig.thickness,
173
- width: (_14 = referenceLinesConfig.referenceLine3Config.width) !== null && _14 !== void 0 ? _14 : defaultReferenceConfig.width,
175
+ width: (_13 = referenceLinesConfig.referenceLine3Config.width) !== null && _13 !== void 0 ? _13 : defaultReferenceConfig.width,
174
176
  color: referenceLinesConfig.referenceLine3Config.color ||
175
177
  defaultReferenceConfig.color,
176
178
  type: referenceLinesConfig.referenceLine3Config.type ||
@@ -183,7 +185,7 @@ export var getHorizSectionVals = function (props) {
183
185
  defaultReferenceConfig.labelText,
184
186
  labelTextStyle: referenceLinesConfig.referenceLine3Config.labelTextStyle ||
185
187
  defaultReferenceConfig.labelTextStyle,
186
- zIndex: (_15 = referenceLinesConfig.referenceLine3Config.zIndex) !== null && _15 !== void 0 ? _15 : defaultReferenceConfig.zIndex
188
+ zIndex: (_14 = referenceLinesConfig.referenceLine3Config.zIndex) !== null && _14 !== void 0 ? _14 : defaultReferenceConfig.zIndex
187
189
  }
188
190
  : defaultReferenceConfig;
189
191
  var getLabelTexts = function (val, index) {
@@ -105,11 +105,13 @@ export var useBarAndLineChartsWrapper = function (props) {
105
105
  ? secondaryData
106
106
  : setWithMinValueInDataset === null || setWithMinValueInDataset === void 0 ? void 0 : setWithMinValueInDataset.data;
107
107
  var _25 = computeMaxAndMinItems(secondaryDataArrayWithMinValue, (_13 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.roundToDigits) !== null && _13 !== void 0 ? _13 : roundToDigits, (_14 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.showFractionalValues) !== null && _14 !== void 0 ? _14 : showFractionalValues), secondaryMaxItem = _25.maxItem, secondaryMinItem = _25.minItem;
108
- var secondaryStepValue = (_15 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.stepValue) !== null && _15 !== void 0 ? _15 : ((_16 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.maxValue) !== null && _16 !== void 0 ? _16 : 0) /
108
+ var secondaryStepValue = (_15 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.stepValue) !== null && _15 !== void 0 ? _15 : ((_16 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.maxValue) !== null && _16 !== void 0 ? _16 : maxValue) /
109
109
  ((_17 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.noOfSections) !== null && _17 !== void 0 ? _17 : noOfSections);
110
110
  var secondaryNegativeStepValue = (_18 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.negativeStepValue) !== null && _18 !== void 0 ? _18 : secondaryStepValue;
111
- var secondaryNoOfSectionsBelowXAxis = (_19 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.noOfSectionsBelowXAxis) !== null && _19 !== void 0 ? _19 : (secondaryNegativeStepValue ? Math.ceil(((_20 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.mostNegativeValue) !== null && _20 !== void 0 ? _20 : secondaryMinItem) /
112
- -secondaryNegativeStepValue) : 0);
111
+ var secondaryNoOfSectionsBelowXAxis = (_19 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.noOfSectionsBelowXAxis) !== null && _19 !== void 0 ? _19 : (secondaryNegativeStepValue
112
+ ? Math.ceil(((_20 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.mostNegativeValue) !== null && _20 !== void 0 ? _20 : secondaryMinItem) /
113
+ -secondaryNegativeStepValue)
114
+ : 0);
113
115
  var primaryYAxisHeightBelowOrigin = noOfSectionsBelowXAxis * negativeStepHeight;
114
116
  var secondaryYAxisHeightBelowOrigin = secondaryNoOfSectionsBelowXAxis *
115
117
  ((_22 = (_21 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.negativeStepHeight) !== null && _21 !== void 0 ? _21 : secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.stepHeight) !== null && _22 !== void 0 ? _22 : stepHeight);
@@ -186,6 +188,7 @@ export var useBarAndLineChartsWrapper = function (props) {
186
188
  initialSpacing: initialSpacing,
187
189
  spacing: spacing,
188
190
  containerHeight: containerHeight,
191
+ containerHeightIncludingBelowXAxis: containerHeightIncludingBelowXAxis,
189
192
  lineConfig: lineConfig,
190
193
  maxValue: (_23 = secondaryYAxis === null || secondaryYAxis === void 0 ? void 0 : secondaryYAxis.maxValue) !== null && _23 !== void 0 ? _23 : maxValue,
191
194
  animatedWidth: animatedWidth,
@@ -109,6 +109,7 @@ export interface LineInBarChartPropsType {
109
109
  initialSpacing: number;
110
110
  spacing: number;
111
111
  containerHeight: number;
112
+ containerHeightIncludingBelowXAxis: number;
112
113
  lineConfig: ExtendedLineConfigType;
113
114
  maxValue: number;
114
115
  animatedWidth: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gifted-charts-core",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
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": [