react-native-gifted-charts 1.4.31 → 1.4.33

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.
@@ -27,7 +27,7 @@ if (Platform.OS === 'android') {
27
27
  var Animated2DWithGradient = function (props) {
28
28
  var _a;
29
29
  var barBackgroundPattern = props.barBackgroundPattern, patternId = props.patternId, barWidth = props.barWidth, barStyle = props.barStyle, item = props.item, index = props.index, opacity = props.opacity, animationDuration = props.animationDuration, noGradient = props.noGradient, noAnimation = props.noAnimation, barMarginBottom = props.barMarginBottom, barInnerComponent = props.barInnerComponent, intactTopLabel = props.intactTopLabel, showValuesAsTopLabel = props.showValuesAsTopLabel, topLabelContainerStyle = props.topLabelContainerStyle, topLabelTextStyle = props.topLabelTextStyle, commonStyleForBar = props.commonStyleForBar, barStyleWithBackground = props.barStyleWithBackground, yAxisOffset = props.yAxisOffset;
30
- var _b = __read(useState(noAnimation ? props.height : 0.2), 2), height = _b[0], setHeight = _b[1];
30
+ var _b = __read(useState(noAnimation ? props.height : 0.4), 2), height = _b[0], setHeight = _b[1]; // if animation fails, increase this constant value of 0.4
31
31
  var _c = __read(useState(!noAnimation), 2), initialRender = _c[0], setInitialRender = _c[1];
32
32
  useEffect(function () {
33
33
  if (!noAnimation) {
@@ -92,7 +92,7 @@ var Animated2DWithGradient = function (props) {
92
92
  : item.capRadius || props.capRadius || 0,
93
93
  } })) })), (item.barBackgroundPattern || barBackgroundPattern) && (_jsxs(Svg, { children: [_jsx(Defs, { children: item.barBackgroundPattern
94
94
  ? item.barBackgroundPattern()
95
- : barBackgroundPattern === null || barBackgroundPattern === void 0 ? void 0 : barBackgroundPattern() }), _jsx(Rect, { stroke: "transparent", x: "1", y: "1", width: item.barWidth || props.barWidth || 30, height: noAnimation ? Math.abs(height) : height, fill: "url(#".concat(item.patternId || patternId, ")") })] })), barInnerComponent ? (_jsx(View, { style: { height: '100%', width: '100%' }, children: barInnerComponent(item, index) })) : null] }) })), item.topLabelComponent || showValuesAsTopLabel ? (_jsx(View, { style: [
95
+ : barBackgroundPattern === null || barBackgroundPattern === void 0 ? void 0 : barBackgroundPattern() }), _jsx(Rect, { stroke: "none", x: "1", y: "1", width: item.barWidth || props.barWidth || 30, height: noAnimation ? Math.abs(height) : height, fill: "url(#".concat(item.patternId || patternId, ")") })] })), barInnerComponent ? (_jsx(View, { style: { height: '100%', width: '100%' }, children: barInnerComponent(item, index) })) : null] }) })), item.topLabelComponent || showValuesAsTopLabel ? (_jsx(View, { style: [
96
96
  {
97
97
  position: 'absolute',
98
98
  top: (item.barWidth || barWidth || 30) * -1,
@@ -116,7 +116,7 @@ var RenderStackBars = function (props) {
116
116
  ] })) : null, stackItem.innerBarComponent && stackItem.innerBarComponent()] }, index));
117
117
  }), (item.barBackgroundPattern || barBackgroundPattern) && (_jsxs(Svg, { children: [_jsx(Defs, { children: item.barBackgroundPattern
118
118
  ? item.barBackgroundPattern()
119
- : barBackgroundPattern === null || barBackgroundPattern === void 0 ? void 0 : barBackgroundPattern() }), _jsx(Rect, { stroke: "transparent", x: "1", y: "1", width: "100%", height: "100%", fill: "url(#".concat(item.patternId || patternId, ")") })] }))] }), localBarInnerComponent ? (_jsx(View, { style: { height: '100%', width: '100%' }, children: localBarInnerComponent(item, index) })) : null, (item.topLabelComponent || showValuesAsTopLabel) && (_jsx(View, { style: [
119
+ : barBackgroundPattern === null || barBackgroundPattern === void 0 ? void 0 : barBackgroundPattern() }), _jsx(Rect, { stroke: "none", x: "1", y: "1", width: "100%", height: "100%", fill: "url(#".concat(item.patternId || patternId, ")") })] }))] }), localBarInnerComponent ? (_jsx(View, { style: { height: '100%', width: '100%' }, children: localBarInnerComponent(item, index) })) : null, (item.topLabelComponent || showValuesAsTopLabel) && (_jsx(View, { style: [
120
120
  {
121
121
  position: 'absolute',
122
122
  top: containsNegativeValue
@@ -141,7 +141,6 @@ var RenderStackBars = function (props) {
141
141
  bottom: 0,
142
142
  height: height,
143
143
  width: '100%',
144
- overflow: 'hidden',
145
144
  }, children: static2DSimple() }));
146
145
  };
147
146
  return (_jsxs(_Fragment, { children: [_jsxs(View, { pointerEvents: props.pointerConfig
@@ -110,7 +110,7 @@ var AnimatedThreeDBar = function (props) {
110
110
  opacity: opacity,
111
111
  },
112
112
  item.barStyle || barStyle,
113
- ], children: [showGradient && (_jsx(LinearGradient, { style: { position: 'absolute', width: '100%', height: '100%' }, start: { x: 0, y: 0 }, end: { x: 1, y: 1 }, colors: [gradientColor, frontColor] })), barBackgroundPattern && (_jsxs(Svg, { children: [_jsx(Defs, { children: barBackgroundPattern() }), _jsx(Rect, { stroke: "transparent", x: "1", y: "1", width: barWidth || 30, height: height, fill: "url(#".concat(patternId, ")") })] })), barInnerComponent ? (_jsx(View, { style: { height: '100%', width: '100%' }, children: barInnerComponent(item, index) })) : null] }), (item.topLabelComponent || showValuesAsTopLabel) && (_jsx(View, { style: [
113
+ ], children: [showGradient && (_jsx(LinearGradient, { style: { position: 'absolute', width: '100%', height: '100%' }, start: { x: 0, y: 0 }, end: { x: 1, y: 1 }, colors: [gradientColor, frontColor] })), barBackgroundPattern && (_jsxs(Svg, { children: [_jsx(Defs, { children: barBackgroundPattern() }), _jsx(Rect, { stroke: "none", x: "1", y: "1", width: barWidth || 30, height: height, fill: "url(#".concat(patternId, ")") })] })), barInnerComponent ? (_jsx(View, { style: { height: '100%', width: '100%' }, children: barInnerComponent(item, index) })) : null] }), (item.topLabelComponent || showValuesAsTopLabel) && (_jsx(View, { style: [
114
114
  {
115
115
  position: 'absolute',
116
116
  top: barWidth * -2,
@@ -4,9 +4,9 @@ import Rule from '../lineSvg';
4
4
  import { styles } from '../../LineChart/styles';
5
5
  import { getHorizSectionVals, yAxisSides, chartTypes, } from 'gifted-charts-core';
6
6
  export var renderHorizSections = function (props) {
7
- var _a, _b;
7
+ var _a, _b, _c, _d;
8
8
  var chartType = props.chartType, width = props.width, noOfSectionsBelowXAxis = props.noOfSectionsBelowXAxis, totalWidth = props.totalWidth, endSpacing = props.endSpacing, yAxisSide = props.yAxisSide, horizontalRulesStyle = props.horizontalRulesStyle, noOfSections = props.noOfSections, sectionColors = props.sectionColors, stepHeight = props.stepHeight, negativeStepHeight = props.negativeStepHeight, yAxisLabelWidth = props.yAxisLabelWidth, yAxisLabelContainerStyle = props.yAxisLabelContainerStyle, yAxisThickness = props.yAxisThickness, yAxisColor = props.yAxisColor, xAxisThickness = props.xAxisThickness, xAxisColor = props.xAxisColor, xAxisLength = props.xAxisLength, xAxisType = props.xAxisType, dashWidth = props.dashWidth, dashGap = props.dashGap, backgroundColor = props.backgroundColor, hideRules = props.hideRules, rulesLength = props.rulesLength, rulesType = props.rulesType, rulesThickness = props.rulesThickness, rulesColor = props.rulesColor, rulesConfigArray = props.rulesConfigArray, spacing = props.spacing, showYAxisIndices = props.showYAxisIndices, yAxisIndicesHeight = props.yAxisIndicesHeight, yAxisIndicesWidth = props.yAxisIndicesWidth, yAxisIndicesColor = props.yAxisIndicesColor, hideOrigin = props.hideOrigin, hideYAxisText = props.hideYAxisText, yAxisTextNumberOfLines = props.yAxisTextNumberOfLines, yAxisTextStyle = props.yAxisTextStyle, rotateYAxisTexts = props.rotateYAxisTexts, rtl = props.rtl, containerHeight = props.containerHeight, maxValue = props.maxValue, yAxisOffset = props.yAxisOffset, horizontal = props.horizontal, yAxisAtTop = props.yAxisAtTop, secondaryYAxis = props.secondaryYAxis, onlyReferenceLines = props.onlyReferenceLines, renderReferenceLines = props.renderReferenceLines, secondaryXAxis = props.secondaryXAxis;
9
- var _c = getHorizSectionVals(props), secondaryYAxisConfig = _c.secondaryYAxisConfig, horizSections = _c.horizSections, yAxisExtraHeightAtTop = _c.yAxisExtraHeightAtTop, secondaryHorizSections = _c.secondaryHorizSections, showReferenceLine1 = _c.showReferenceLine1, referenceLine1Config = _c.referenceLine1Config, referenceLine1Position = _c.referenceLine1Position, showReferenceLine2 = _c.showReferenceLine2, referenceLine2Config = _c.referenceLine2Config, referenceLine2Position = _c.referenceLine2Position, showReferenceLine3 = _c.showReferenceLine3, referenceLine3Config = _c.referenceLine3Config, referenceLine3Position = _c.referenceLine3Position, horizSectionsBelow = _c.horizSectionsBelow, secondaryHorizSectionsBelow = _c.secondaryHorizSectionsBelow, getLabelTexts = _c.getLabelTexts, getLabelTextsForSecondaryYAxis = _c.getLabelTextsForSecondaryYAxis;
9
+ var _e = getHorizSectionVals(props), secondaryYAxisConfig = _e.secondaryYAxisConfig, horizSections = _e.horizSections, yAxisExtraHeightAtTop = _e.yAxisExtraHeightAtTop, secondaryHorizSections = _e.secondaryHorizSections, showReferenceLine1 = _e.showReferenceLine1, referenceLine1Config = _e.referenceLine1Config, referenceLine1Position = _e.referenceLine1Position, showReferenceLine2 = _e.showReferenceLine2, referenceLine2Config = _e.referenceLine2Config, referenceLine2Position = _e.referenceLine2Position, showReferenceLine3 = _e.showReferenceLine3, referenceLine3Config = _e.referenceLine3Config, referenceLine3Position = _e.referenceLine3Position, horizSectionsBelow = _e.horizSectionsBelow, secondaryHorizSectionsBelow = _e.secondaryHorizSectionsBelow, getLabelTexts = _e.getLabelTexts, getLabelTextsForSecondaryYAxis = _e.getLabelTextsForSecondaryYAxis;
10
10
  var secondaryYAxisExtraHeightAtBottom = 10;
11
11
  var renderAxesAndRules = function (index) {
12
12
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
@@ -93,7 +93,7 @@ export var renderHorizSections = function (props) {
93
93
  };
94
94
  var renderSecondaryYaxisLabels = function (horizSections, isBelow) {
95
95
  return horizSections.map(function (sectionItems, index) {
96
- var _a, _b, _c, _d, _e, _f, _g;
96
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
97
97
  var label = getLabelTextsForSecondaryYAxis(sectionItems.value, index);
98
98
  if (secondaryYAxisConfig.hideOrigin && index === 0) {
99
99
  label = '';
@@ -114,14 +114,21 @@ export var renderHorizSections = function (props) {
114
114
  ? ((_e = (_d = secondaryYAxisConfig.negativeStepHeight) !== null && _d !== void 0 ? _d : secondaryYAxisConfig.stepHeight) !== null && _e !== void 0 ? _e : 0)
115
115
  : ((_f = secondaryYAxisConfig.stepHeight) !== null && _f !== void 0 ? _f : 0),
116
116
  },
117
- yAxisLabelContainerStyle,
117
+ (_g = secondaryYAxisConfig.yAxisLabelContainerStyle) !== null && _g !== void 0 ? _g : yAxisLabelContainerStyle,
118
118
  ], children: [secondaryYAxisConfig.showYAxisIndices && (index !== 0 || isBelow) ? (_jsx(View, { style: {
119
119
  height: secondaryYAxisConfig.yAxisIndicesHeight,
120
120
  width: secondaryYAxisConfig.yAxisIndicesWidth,
121
121
  position: 'absolute',
122
- left: ((_g = secondaryYAxisConfig.yAxisIndicesWidth) !== null && _g !== void 0 ? _g : 0) / -2,
122
+ left: ((_h = secondaryYAxisConfig.yAxisIndicesWidth) !== null && _h !== void 0 ? _h : 0) / -2,
123
123
  backgroundColor: secondaryYAxisConfig.yAxisIndicesColor,
124
- } })) : null, _jsx(Text, { numberOfLines: secondaryYAxisConfig.yAxisTextNumberOfLines, ellipsizeMode: 'clip', style: [secondaryYAxisConfig.yAxisTextStyle], children: label })] }, index));
124
+ } })) : null, _jsx(Text, { numberOfLines: secondaryYAxisConfig.yAxisTextNumberOfLines, ellipsizeMode: 'clip', style: [
125
+ {
126
+ textAlign: 'left',
127
+ width: (_k = (_j = secondaryYAxisConfig.yAxisLabelContainerStyle) === null || _j === void 0 ? void 0 : _j.width) !== null && _k !== void 0 ? _k : secondaryYAxisConfig.yAxisLabelWidth,
128
+ marginLeft: 10,
129
+ },
130
+ secondaryYAxisConfig.yAxisTextStyle,
131
+ ], children: label })] }, index));
125
132
  });
126
133
  };
127
134
  var referenceLines = function () {
@@ -319,7 +326,6 @@ export var renderHorizSections = function (props) {
319
326
  borderLeftWidth: secondaryYAxisConfig.yAxisThickness,
320
327
  height: containerHeight + yAxisExtraHeightAtTop,
321
328
  bottom: stepHeight / -2,
322
- // backgroundColor:'red'
323
329
  }, children: !secondaryYAxisConfig.hideYAxisText
324
330
  ? renderSecondaryYaxisLabels(secondaryHorizSections, false)
325
331
  : null })) : null,
@@ -327,15 +333,15 @@ export var renderHorizSections = function (props) {
327
333
  /************************* Render the secondary Y Axis below origin *********************/
328
334
  /***********************************************************************************************/
329
335
  secondaryYAxisConfig.noOfSectionsBelowXAxis ? (_jsx(View, { style: {
330
- width: secondaryYAxisConfig.yAxisLabelWidth,
336
+ width: (_a = secondaryYAxisConfig.yAxisLabelWidth) !== null && _a !== void 0 ? _a : yAxisLabelWidth,
331
337
  left: (width ? yAxisLabelWidth : yAxisLabelWidth - spacing) -
332
- yAxisLabelWidth,
338
+ ((_b = secondaryYAxisConfig.yAxisLabelWidth) !== null && _b !== void 0 ? _b : yAxisLabelWidth),
333
339
  borderColor: secondaryYAxisConfig.yAxisColor,
334
340
  borderLeftWidth: secondaryYAxisConfig.yAxisThickness,
335
- height: ((_b = (_a = secondaryYAxisConfig.negativeStepHeight) !== null && _a !== void 0 ? _a : secondaryYAxisConfig.stepHeight) !== null && _b !== void 0 ? _b : stepHeight) *
341
+ height: ((_d = (_c = secondaryYAxisConfig.negativeStepHeight) !== null && _c !== void 0 ? _c : secondaryYAxisConfig.stepHeight) !== null && _d !== void 0 ? _d : stepHeight) *
336
342
  secondaryHorizSectionsBelow.length +
337
343
  secondaryYAxisExtraHeightAtBottom,
338
- bottom: -containerHeight - stepHeight * 0.84,
344
+ bottom: -containerHeight - stepHeight / 2 - yAxisExtraHeightAtTop,
339
345
  }, children: !secondaryYAxisConfig.hideYAxisText
340
346
  ? renderSecondaryYaxisLabels(secondaryHorizSectionsBelow, true)
341
347
  : null })) : null] })) }));
@@ -6,7 +6,7 @@ import { renderDataPoints } from './renderDataPoints';
6
6
  import { renderSpecificDataPoints } from './renderSpecificDataPoints';
7
7
  var RenderLineInBarChart = function (props) {
8
8
  var _a;
9
- var yAxisLabelWidth = props.yAxisLabelWidth, initialSpacing = props.initialSpacing, spacing = props.spacing, containerHeight = props.containerHeight, lineConfig = props.lineConfig, maxValue = props.maxValue, animatedWidth = props.animatedWidth, lineBehindBars = props.lineBehindBars, points = props.points, arrowPoints = props.arrowPoints, data = props.data, totalWidth = props.totalWidth, barWidth = props.barWidth, labelsExtraHeight = props.labelsExtraHeight, xAxisLabelsVerticalShift = props.xAxisLabelsVerticalShift, selectedIndex = props.selectedIndex;
9
+ var yAxisLabelWidth = props.yAxisLabelWidth, initialSpacing = props.initialSpacing, spacing = props.spacing, containerHeight = props.containerHeight, lineConfig = props.lineConfig, maxValue = props.maxValue, animatedWidth = props.animatedWidth, lineBehindBars = props.lineBehindBars, points = props.points, arrowPoints = props.arrowPoints, data = props.data, totalWidth = props.totalWidth, barWidth = props.barWidth, labelsExtraHeight = props.labelsExtraHeight, xAxisLabelsVerticalShift = props.xAxisLabelsVerticalShift, selectedIndex = props.selectedIndex, containerHeightIncludingBelowXAxis = props.containerHeightIncludingBelowXAxis;
10
10
  var firstBarWidth = (_a = data[0].barWidth) !== null && _a !== void 0 ? _a : barWidth;
11
11
  var dataPointsProps = {
12
12
  data: data,
@@ -57,7 +57,7 @@ var RenderLineInBarChart = function (props) {
57
57
  var _a, _b, _c;
58
58
  return (_jsx(View, { pointerEvents: "none", style: {
59
59
  position: 'absolute',
60
- height: containerHeight + 10 + labelsExtraHeight,
60
+ height: containerHeightIncludingBelowXAxis + labelsExtraHeight,
61
61
  left: 6 - yAxisLabelWidth,
62
62
  bottom: 50 + xAxisLabelsVerticalShift, //stepHeight * -0.5 + xAxisThickness,
63
63
  width: totalWidth,
@@ -4,6 +4,6 @@ var BarBackgroundPattern = function (props) {
4
4
  var barBackgroundPatternFromItem = props.barBackgroundPatternFromItem, barBackgroundPatternFromProps = props.barBackgroundPatternFromProps, patternIdFromItem = props.patternIdFromItem, patternIdFromProps = props.patternIdFromProps;
5
5
  return (_jsxs(Svg, { children: [_jsx(Defs, { children: barBackgroundPatternFromItem
6
6
  ? barBackgroundPatternFromItem()
7
- : barBackgroundPatternFromProps() }), _jsx(Rect, { stroke: "transparent", x: "1", y: "1", width: "100%", height: "100%", fill: "url(#".concat(patternIdFromItem !== null && patternIdFromItem !== void 0 ? patternIdFromItem : patternIdFromProps, ")") })] }));
7
+ : barBackgroundPatternFromProps() }), _jsx(Rect, { stroke: "none", x: "1", y: "1", width: "100%", height: "100%", fill: "url(#".concat(patternIdFromItem !== null && patternIdFromItem !== void 0 ? patternIdFromItem : patternIdFromProps, ")") })] }));
8
8
  };
9
9
  export default BarBackgroundPattern;
@@ -620,7 +620,8 @@ export var LineChart = function (props) {
620
620
  }
621
621
  return _jsx(Path, __assign({}, lineSvgProps), index);
622
622
  })) : animateOnDataChange && animatedPath ? (_jsx(AnimatedPath, __assign({}, lineSvgPropsOuter))) : (_jsx(Path, __assign({}, lineSvgPropsOuter))), isNthAreaChart &&
623
- getAreaGradientComponent(startFillColor, endFillColor, startOpacity, endOpacity), isNthAreaChart ? (animateOnDataChange && animatedFillPath ? (_jsx(AnimatedPath, { onPress: props.onChartAreaPress, d: animatedFillPath, fill: props.areaGradientId
623
+ getAreaGradientComponent(startFillColor, endFillColor, startOpacity, endOpacity), isNthAreaChart ? (props.interpolateMissingValues === false &&
624
+ propsData.some(function (item) { return isNaN(item.value); }) ? null : animateOnDataChange && animatedFillPath ? (_jsx(AnimatedPath, { onPress: props.onChartAreaPress, d: animatedFillPath, fill: props.areaGradientId
624
625
  ? "url(#".concat(props.areaGradientId, ")")
625
626
  : "url(#Gradient)", stroke: 'none', strokeWidth: currentLineThickness || thickness })) : (_jsx(Path, { onPress: props.onChartAreaPress, d: fillPoints, fill: props.areaGradientId
626
627
  ? "url(#".concat(props.areaGradientId, ")")
@@ -8,6 +8,7 @@ export var PieChartMain = function (props) {
8
8
  var _a = getPieChartMainProps(props), isThreeD = _a.isThreeD, isBiggerPie = _a.isBiggerPie, data = _a.data, showInnerComponent = _a.showInnerComponent, radius = _a.radius, canvasWidth = _a.canvasWidth, canvasHeight = _a.canvasHeight, shadowWidth = _a.shadowWidth, backgroundColor = _a.backgroundColor, shadowColor = _a.shadowColor, semiCircle = _a.semiCircle, pi = _a.pi, initialAngle = _a.initialAngle, shadow = _a.shadow, donut = _a.donut, strokeWidth = _a.strokeWidth, strokeColor = _a.strokeColor, innerRadius = _a.innerRadius, showText = _a.showText, textColor = _a.textColor, textSize = _a.textSize, tiltAngle = _a.tiltAngle, labelsPosition = _a.labelsPosition, showTextBackground = _a.showTextBackground, textBackgroundColor = _a.textBackgroundColor, showValuesAsLabels = _a.showValuesAsLabels, showGradient = _a.showGradient, gradientCenterColor = _a.gradientCenterColor, toggleFocusOnPress = _a.toggleFocusOnPress, minShiftX = _a.minShiftX, minShiftY = _a.minShiftY, total = _a.total, horizAdjustment = _a.horizAdjustment, vertAdjustment = _a.vertAdjustment, cx = _a.cx, cy = _a.cy, pData = _a.pData, mData = _a.mData, paddingHorizontal = _a.paddingHorizontal, paddingVertical = _a.paddingVertical, extraRadius = _a.extraRadius, showExternalLabels = _a.showExternalLabels, getExternaLabelProperties = _a.getExternaLabelProperties;
9
9
  var prevSide = 'right';
10
10
  var prevLabelComponentX = 0;
11
+ var wasFirstItemOnPole = false;
11
12
  return (_jsxs(View, { pointerEvents: "box-none", style: [
12
13
  {
13
14
  backgroundColor: backgroundColor,
@@ -120,9 +121,12 @@ export var PieChartMain = function (props) {
120
121
  y = cy;
121
122
  }
122
123
  }
123
- var _h = getExternaLabelProperties(item, mx, my, cx, cy, prevSide, prevLabelComponentX), labelLineColor = _h.labelLineColor, labelLineThickness = _h.labelLineThickness, labelComponentHeight = _h.labelComponentHeight, inX = _h.inX, inY = _h.inY, outX = _h.outX, outY = _h.outY, finalX = _h.finalX, labelComponentX = _h.labelComponentX, labelComponentY = _h.labelComponentY, localExternalLabelComponent = _h.localExternalLabelComponent, isRightHalf = _h.isRightHalf;
124
+ var _h = getExternaLabelProperties(item, mx, my, cx, cy, prevSide, prevLabelComponentX, index === data.length - 1, // isLast
125
+ wasFirstItemOnPole), labelLineColor = _h.labelLineColor, labelLineThickness = _h.labelLineThickness, labelComponentHeight = _h.labelComponentHeight, inX = _h.inX, inY = _h.inY, outX = _h.outX, outY = _h.outY, finalX = _h.finalX, labelComponentX = _h.labelComponentX, labelComponentY = _h.labelComponentY, localExternalLabelComponent = _h.localExternalLabelComponent, isRightHalf = _h.isRightHalf;
124
126
  prevSide = isRightHalf ? 'right' : 'left';
125
127
  prevLabelComponentX = labelComponentX;
128
+ if (index === 0)
129
+ wasFirstItemOnPole = labelComponentY !== outY;
126
130
  return (_jsxs(React.Fragment, { children: [showExternalLabels ? (_jsxs(G, { children: [_jsx(Line, { x1: inX, x2: outX, y1: inY, y2: outY, stroke: labelLineColor, strokeWidth: labelLineThickness }), _jsx(Line, { x1: outX, x2: finalX, y1: outY, y2: outY, stroke: labelLineColor, strokeWidth: labelLineThickness }), localExternalLabelComponent ? (_jsx(G, { x: labelComponentX, y: labelComponentY + labelComponentHeight / 2, children: (_b = localExternalLabelComponent === null || localExternalLabelComponent === void 0 ? void 0 : localExternalLabelComponent(item, index)) !== null && _b !== void 0 ? _b : null })) : null] })) : null, showTextBackground ? (_jsx(Circle, { cx: x + ((_d = (_c = item.shiftTextBackgroundX) !== null && _c !== void 0 ? _c : item.shiftTextX) !== null && _d !== void 0 ? _d : 0), cy: y +
127
131
  ((_f = (_e = item.shiftTextBackgroundY) !== null && _e !== void 0 ? _e : item.shiftTextY) !== null && _f !== void 0 ? _f : 0) -
128
132
  (item.textSize || textSize) / 4, r: item.textBackgroundRadius ||
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-gifted-charts",
3
- "version": "1.4.31",
3
+ "version": "1.4.33",
4
4
  "description": "The most complete library for Bar, Line, Area, Pie, Donut, Stacked Bar and Population Pyramid charts in React Native. Allows 2D, 3D, gradient, animations and live data updates.",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -25,7 +25,7 @@
25
25
  "registry": "https://registry.npmjs.org/"
26
26
  },
27
27
  "dependencies": {
28
- "gifted-charts-core": "^0.1.32"
28
+ "gifted-charts-core": "^0.1.34"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/cli": "^7.24.8",