react-native-gifted-charts 1.4.21 → 1.4.22

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.
Files changed (61) hide show
  1. package/dist/BarChart/Animated2DWithGradient.d.ts +3 -0
  2. package/dist/BarChart/Animated2DWithGradient.js +113 -1
  3. package/dist/BarChart/RenderBars.d.ts +3 -0
  4. package/dist/BarChart/RenderBars.js +264 -1
  5. package/dist/BarChart/RenderStackBars.d.ts +3 -0
  6. package/dist/BarChart/RenderStackBars.js +172 -1
  7. package/dist/BarChart/index.d.ts +2 -0
  8. package/dist/BarChart/index.js +233 -1
  9. package/dist/BarChart/styles.d.ts +45 -0
  10. package/dist/BarChart/styles.js +46 -1
  11. package/dist/Components/AnimatedThreeDBar/index.d.ts +3 -0
  12. package/dist/Components/AnimatedThreeDBar/index.js +129 -1
  13. package/dist/Components/AnimatedThreeDBar/styles.d.ts +10 -0
  14. package/dist/Components/AnimatedThreeDBar/styles.js +13 -1
  15. package/dist/Components/BarAndLineChartsWrapper/index.d.ts +3 -0
  16. package/dist/Components/BarAndLineChartsWrapper/index.js +128 -1
  17. package/dist/Components/BarAndLineChartsWrapper/renderHorizSections.d.ts +2 -0
  18. package/dist/Components/BarAndLineChartsWrapper/renderHorizSections.js +322 -1
  19. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/index.d.ts +3 -0
  20. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/index.js +76 -1
  21. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/renderDataPoints.d.ts +2 -0
  22. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/renderDataPoints.js +50 -1
  23. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/renderSpecificDataPoints.d.ts +1 -0
  24. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/renderSpecificDataPoints.js +25 -1
  25. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/renderSpecificVerticalLines.d.ts +1 -0
  26. package/dist/Components/BarAndLineChartsWrapper/renderLineInBarChart/renderSpecificVerticalLines.js +20 -1
  27. package/dist/Components/BarAndLineChartsWrapper/renderVerticalLines.d.ts +2 -0
  28. package/dist/Components/BarAndLineChartsWrapper/renderVerticalLines.js +94 -1
  29. package/dist/Components/BarSpecificComponents/barBackgroundPattern.d.ts +2 -0
  30. package/dist/Components/BarSpecificComponents/barBackgroundPattern.js +9 -1
  31. package/dist/Components/BarSpecificComponents/cap.d.ts +2 -0
  32. package/dist/Components/BarSpecificComponents/cap.js +16 -1
  33. package/dist/Components/BarSpecificComponents/tooltip.d.ts +15 -0
  34. package/dist/Components/BarSpecificComponents/tooltip.js +40 -1
  35. package/dist/Components/common/LinearGradient.d.ts +16 -0
  36. package/dist/Components/common/LinearGradient.js +15 -1
  37. package/dist/Components/common/Pointer.d.ts +1 -0
  38. package/dist/Components/common/Pointer.js +16 -1
  39. package/dist/Components/common/StripAndLabel.d.ts +1 -0
  40. package/dist/Components/common/StripAndLabel.js +43 -1
  41. package/dist/Components/lineSvg.d.ts +14 -0
  42. package/dist/Components/lineSvg.js +22 -1
  43. package/dist/LineChart/LineChartBicolor.d.ts +2 -0
  44. package/dist/LineChart/LineChartBicolor.js +294 -1
  45. package/dist/LineChart/index.d.ts +2 -0
  46. package/dist/LineChart/index.js +1089 -1
  47. package/dist/LineChart/styles.d.ts +43 -0
  48. package/dist/LineChart/styles.js +46 -1
  49. package/dist/PieChart/index.d.ts +2 -0
  50. package/dist/PieChart/index.js +99 -1
  51. package/dist/PieChart/main.d.ts +2 -0
  52. package/dist/PieChart/main.js +182 -1
  53. package/dist/PieChartPro/index.d.ts +2 -0
  54. package/dist/PieChartPro/index.js +124 -1
  55. package/dist/PopulationPyramid/index.d.ts +2 -0
  56. package/dist/PopulationPyramid/index.js +130 -1
  57. package/dist/index.d.ts +7 -0
  58. package/dist/index.js +7 -1
  59. package/dist/utils/index.d.ts +2 -0
  60. package/dist/utils/index.js +12 -1
  61. package/package.json +3 -3
@@ -1 +1,1089 @@
1
- var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.LineChart=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _styles=require("./styles");var _utils=require("../utils");var _reactNativeSvg=_interopRequireWildcard(require("react-native-svg"));var _giftedChartsCore=require("gifted-charts-core");var _BarAndLineChartsWrapper=_interopRequireDefault(require("../Components/BarAndLineChartsWrapper"));var _StripAndLabel=require("../Components/common/StripAndLabel");var _Pointer=require("../Components/common/Pointer");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="/Users/abhinandankushwaha/sites/projects/react-native-gifted-charts/src/LineChart/index.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}var initialData=null;var animations=[];var LineChart=exports.LineChart=function LineChart(props){var _props$scrollRef,_props$parentWidth;var scrollRef=(_props$scrollRef=props.scrollRef)!=null?_props$scrollRef:(0,_react.useRef)(null);var opacValue=(0,_react.useMemo)(function(){return new _reactNative.Animated.Value(0);},[]);var heightValue=(0,_react.useMemo)(function(){return new _reactNative.Animated.Value(0);},[]);var widthValue=(0,_react.useMemo)(function(){return new _reactNative.Animated.Value(0);},[]);var widthValue2=(0,_react.useMemo)(function(){return new _reactNative.Animated.Value(0);},[]);var widthValue3=(0,_react.useMemo)(function(){return new _reactNative.Animated.Value(0);},[]);var widthValue4=(0,_react.useMemo)(function(){return new _reactNative.Animated.Value(0);},[]);var widthValue5=(0,_react.useMemo)(function(){return new _reactNative.Animated.Value(0);},[]);if(!initialData){var _ref,_props$dataSet$0$data,_props$dataSet,_props$dataSet$;initialData=(_ref=(_props$dataSet$0$data=(_props$dataSet=props.dataSet)==null?void 0:(_props$dataSet$=_props$dataSet[0])==null?void 0:_props$dataSet$.data)!=null?_props$dataSet$0$data:props.data)!=null?_ref:[];animations=initialData.filter(function(item){return item.value;}).map(function(item){return new _reactNative.Animated.Value(item.value);});}var _useLineChart=(0,_giftedChartsCore.useLineChart)(Object.assign({},props,{animations:animations,parentWidth:(_props$parentWidth=props.parentWidth)!=null?_props$parentWidth:_utils.screenWidth})),scrollX=_useLineChart.scrollX,setScrollX=_useLineChart.setScrollX,arrow1Points=_useLineChart.arrow1Points,arrow2Points=_useLineChart.arrow2Points,arrow3Points=_useLineChart.arrow3Points,arrow4Points=_useLineChart.arrow4Points,arrow5Points=_useLineChart.arrow5Points,secondaryArrowPoints=_useLineChart.secondaryArrowPoints,pointerIndex=_useLineChart.pointerIndex,setPointerIndex=_useLineChart.setPointerIndex,pointerX=_useLineChart.pointerX,setPointerX=_useLineChart.setPointerX,pointerY=_useLineChart.pointerY,setPointerY=_useLineChart.setPointerY,pointerItem=_useLineChart.pointerItem,setPointerItem=_useLineChart.setPointerItem,pointerY2=_useLineChart.pointerY2,setPointerY2=_useLineChart.setPointerY2,pointerItem2=_useLineChart.pointerItem2,setPointerItem2=_useLineChart.setPointerItem2,pointerY3=_useLineChart.pointerY3,setPointerY3=_useLineChart.setPointerY3,pointerItem3=_useLineChart.pointerItem3,setPointerItem3=_useLineChart.setPointerItem3,pointerY4=_useLineChart.pointerY4,setPointerY4=_useLineChart.setPointerY4,pointerItem4=_useLineChart.pointerItem4,setPointerItem4=_useLineChart.setPointerItem4,pointerY5=_useLineChart.pointerY5,setPointerY5=_useLineChart.setPointerY5,pointerYsForDataSet=_useLineChart.pointerYsForDataSet,setPointerYsForDataSet=_useLineChart.setPointerYsForDataSet,pointerItem5=_useLineChart.pointerItem5,setPointerItem5=_useLineChart.setPointerItem5,secondaryPointerY=_useLineChart.secondaryPointerY,setSecondaryPointerY=_useLineChart.setSecondaryPointerY,secondaryPointerItem=_useLineChart.secondaryPointerItem,setSecondaryPointerItem=_useLineChart.setSecondaryPointerItem,responderStartTime=_useLineChart.responderStartTime,setResponderStartTime=_useLineChart.setResponderStartTime,setResponderActive=_useLineChart.setResponderActive,points=_useLineChart.points,points2=_useLineChart.points2,points3=_useLineChart.points3,points4=_useLineChart.points4,points5=_useLineChart.points5,secondaryPoints=_useLineChart.secondaryPoints,fillPoints=_useLineChart.fillPoints,fillPoints2=_useLineChart.fillPoints2,fillPoints3=_useLineChart.fillPoints3,fillPoints4=_useLineChart.fillPoints4,fillPoints5=_useLineChart.fillPoints5,secondaryFillPoints=_useLineChart.secondaryFillPoints,pointsFromSet=_useLineChart.pointsFromSet,fillPointsFromSet=_useLineChart.fillPointsFromSet,arrowPointsFromSet=_useLineChart.arrowPointsFromSet,selectedIndex=_useLineChart.selectedIndex,setSelectedIndex=_useLineChart.setSelectedIndex,containerHeight=_useLineChart.containerHeight,data=_useLineChart.data,data2=_useLineChart.data2,data3=_useLineChart.data3,data4=_useLineChart.data4,data5=_useLineChart.data5,secondaryData=_useLineChart.secondaryData,dataSet=_useLineChart.dataSet,data0=_useLineChart.data0,labelsExtraHeight=_useLineChart.labelsExtraHeight,animationDuration=_useLineChart.animationDuration,onDataChangeAnimationDuration=_useLineChart.onDataChangeAnimationDuration,animateTogether=_useLineChart.animateTogether,animateOnDataChange=_useLineChart.animateOnDataChange,startIndex1=_useLineChart.startIndex1,startIndex2=_useLineChart.startIndex2,endIndex1=_useLineChart.endIndex1,endIndex2=_useLineChart.endIndex2,startIndex3=_useLineChart.startIndex3,endIndex3=_useLineChart.endIndex3,startIndex4=_useLineChart.startIndex4,endIndex4=_useLineChart.endIndex4,startIndex5=_useLineChart.startIndex5,endIndex5=_useLineChart.endIndex5,initialSpacing=_useLineChart.initialSpacing,thickness=_useLineChart.thickness,yAxisLabelWidth=_useLineChart.yAxisLabelWidth,spacing=_useLineChart.spacing,xAxisThickness=_useLineChart.xAxisThickness,dataPointsHeight1=_useLineChart.dataPointsHeight1,dataPointsWidth1=_useLineChart.dataPointsWidth1,dataPointsRadius1=_useLineChart.dataPointsRadius1,dataPointsColor1=_useLineChart.dataPointsColor1,dataPointsShape1=_useLineChart.dataPointsShape1,dataPointsHeight2=_useLineChart.dataPointsHeight2,dataPointsWidth2=_useLineChart.dataPointsWidth2,dataPointsRadius2=_useLineChart.dataPointsRadius2,dataPointsColor2=_useLineChart.dataPointsColor2,dataPointsShape2=_useLineChart.dataPointsShape2,dataPointsHeight3=_useLineChart.dataPointsHeight3,dataPointsWidth3=_useLineChart.dataPointsWidth3,dataPointsRadius3=_useLineChart.dataPointsRadius3,dataPointsColor3=_useLineChart.dataPointsColor3,dataPointsShape3=_useLineChart.dataPointsShape3,dataPointsHeight4=_useLineChart.dataPointsHeight4,dataPointsWidth4=_useLineChart.dataPointsWidth4,dataPointsRadius4=_useLineChart.dataPointsRadius4,dataPointsColor4=_useLineChart.dataPointsColor4,dataPointsShape4=_useLineChart.dataPointsShape4,dataPointsHeight5=_useLineChart.dataPointsHeight5,dataPointsWidth5=_useLineChart.dataPointsWidth5,dataPointsRadius5=_useLineChart.dataPointsRadius5,dataPointsColor5=_useLineChart.dataPointsColor5,dataPointsShape5=_useLineChart.dataPointsShape5,getIsNthAreaChart=_useLineChart.getIsNthAreaChart,textFontSize1=_useLineChart.textFontSize1,textFontSize2=_useLineChart.textFontSize2,textFontSize3=_useLineChart.textFontSize3,textFontSize4=_useLineChart.textFontSize4,textFontSize5=_useLineChart.textFontSize5,textColor1=_useLineChart.textColor1,textColor2=_useLineChart.textColor2,textColor3=_useLineChart.textColor3,textColor4=_useLineChart.textColor4,textColor5=_useLineChart.textColor5,totalWidth=_useLineChart.totalWidth,maxValue=_useLineChart.maxValue,overflowTop=_useLineChart.overflowTop,extendedContainerHeight=_useLineChart.extendedContainerHeight,getX=_useLineChart.getX,getY=_useLineChart.getY,getSecondaryY=_useLineChart.getSecondaryY,secondaryMaxValue=_useLineChart.secondaryMaxValue,showValuesAsDataPointsText=_useLineChart.showValuesAsDataPointsText,thickness1=_useLineChart.thickness1,thickness2=_useLineChart.thickness2,thickness3=_useLineChart.thickness3,thickness4=_useLineChart.thickness4,thickness5=_useLineChart.thickness5,zIndex1=_useLineChart.zIndex1,zIndex2=_useLineChart.zIndex2,zIndex3=_useLineChart.zIndex3,zIndex4=_useLineChart.zIndex4,zIndex5=_useLineChart.zIndex5,strokeDashArray1=_useLineChart.strokeDashArray1,strokeDashArray2=_useLineChart.strokeDashArray2,strokeDashArray3=_useLineChart.strokeDashArray3,strokeDashArray4=_useLineChart.strokeDashArray4,strokeDashArray5=_useLineChart.strokeDashArray5,rotateLabel=_useLineChart.rotateLabel,isAnimated=_useLineChart.isAnimated,hideDataPoints1=_useLineChart.hideDataPoints1,hideDataPoints2=_useLineChart.hideDataPoints2,hideDataPoints3=_useLineChart.hideDataPoints3,hideDataPoints4=_useLineChart.hideDataPoints4,hideDataPoints5=_useLineChart.hideDataPoints5,color1=_useLineChart.color1,color2=_useLineChart.color2,color3=_useLineChart.color3,color4=_useLineChart.color4,color5=_useLineChart.color5,startFillColor1=_useLineChart.startFillColor1,endFillColor1=_useLineChart.endFillColor1,startOpacity1=_useLineChart.startOpacity1,endOpacity1=_useLineChart.endOpacity1,startFillColor2=_useLineChart.startFillColor2,endFillColor2=_useLineChart.endFillColor2,startOpacity2=_useLineChart.startOpacity2,endOpacity2=_useLineChart.endOpacity2,startFillColor3=_useLineChart.startFillColor3,endFillColor3=_useLineChart.endFillColor3,startOpacity3=_useLineChart.startOpacity3,endOpacity3=_useLineChart.endOpacity3,startFillColor4=_useLineChart.startFillColor4,endFillColor4=_useLineChart.endFillColor4,startOpacity4=_useLineChart.startOpacity4,endOpacity4=_useLineChart.endOpacity4,startFillColor5=_useLineChart.startFillColor5,endFillColor5=_useLineChart.endFillColor5,startOpacity5=_useLineChart.startOpacity5,endOpacity5=_useLineChart.endOpacity5,arrowStrokeWidth1=_useLineChart.arrowStrokeWidth1,arrowStrokeColor1=_useLineChart.arrowStrokeColor1,arrowFillColor1=_useLineChart.arrowFillColor1,arrowStrokeWidth2=_useLineChart.arrowStrokeWidth2,arrowStrokeColor2=_useLineChart.arrowStrokeColor2,arrowFillColor2=_useLineChart.arrowFillColor2,arrowStrokeWidth3=_useLineChart.arrowStrokeWidth3,arrowStrokeColor3=_useLineChart.arrowStrokeColor3,arrowFillColor3=_useLineChart.arrowFillColor3,arrowStrokeWidth4=_useLineChart.arrowStrokeWidth4,arrowStrokeColor4=_useLineChart.arrowStrokeColor4,arrowFillColor4=_useLineChart.arrowFillColor4,arrowStrokeWidth5=_useLineChart.arrowStrokeWidth5,arrowStrokeColor5=_useLineChart.arrowStrokeColor5,arrowFillColor5=_useLineChart.arrowFillColor5,arrowStrokeWidthsFromSet=_useLineChart.arrowStrokeWidthsFromSet,arrowStrokeColorsFromSet=_useLineChart.arrowStrokeColorsFromSet,arrowFillColorsFromSet=_useLineChart.arrowFillColorsFromSet,secondaryLineConfig=_useLineChart.secondaryLineConfig,gradientDirection=_useLineChart.gradientDirection,stepHeight=_useLineChart.stepHeight,noOfSectionsBelowXAxis=_useLineChart.noOfSectionsBelowXAxis,xAxisTextNumberOfLines=_useLineChart.xAxisTextNumberOfLines,xAxisLabelsVerticalShift=_useLineChart.xAxisLabelsVerticalShift,pointerConfig=_useLineChart.pointerConfig,pointerHeight=_useLineChart.pointerHeight,pointerWidth=_useLineChart.pointerWidth,pointerRadius=_useLineChart.pointerRadius,pointerColor=_useLineChart.pointerColor,pointerComponent=_useLineChart.pointerComponent,showPointerStrip=_useLineChart.showPointerStrip,pointerStripHeight=_useLineChart.pointerStripHeight,pointerStripWidth=_useLineChart.pointerStripWidth,pointerStripColor=_useLineChart.pointerStripColor,pointerStripUptoDataPoint=_useLineChart.pointerStripUptoDataPoint,pointerLabelComponent=_useLineChart.pointerLabelComponent,stripOverPointer=_useLineChart.stripOverPointer,shiftPointerLabelX=_useLineChart.shiftPointerLabelX,shiftPointerLabelY=_useLineChart.shiftPointerLabelY,pointerLabelWidth=_useLineChart.pointerLabelWidth,pointerLabelHeight=_useLineChart.pointerLabelHeight,autoAdjustPointerLabelPosition=_useLineChart.autoAdjustPointerLabelPosition,pointerVanishDelay=_useLineChart.pointerVanishDelay,activatePointersOnLongPress=_useLineChart.activatePointersOnLongPress,activatePointersDelay=_useLineChart.activatePointersDelay,persistPointer=_useLineChart.persistPointer,hidePointer1=_useLineChart.hidePointer1,hidePointer2=_useLineChart.hidePointer2,hidePointer3=_useLineChart.hidePointer3,hidePointer4=_useLineChart.hidePointer4,hidePointer5=_useLineChart.hidePointer5,hideSecondaryPointer=_useLineChart.hideSecondaryPointer,pointerEvents=_useLineChart.pointerEvents,focusEnabled=_useLineChart.focusEnabled,showDataPointOnFocus=_useLineChart.showDataPointOnFocus,showStripOnFocus=_useLineChart.showStripOnFocus,showTextOnFocus=_useLineChart.showTextOnFocus,showDataPointLabelOnFocus=_useLineChart.showDataPointLabelOnFocus,stripHeight=_useLineChart.stripHeight,stripWidth=_useLineChart.stripWidth,stripColor=_useLineChart.stripColor,stripOpacity=_useLineChart.stripOpacity,stripStrokeDashArray=_useLineChart.stripStrokeDashArray,unFocusOnPressOut=_useLineChart.unFocusOnPressOut,delayBeforeUnFocus=_useLineChart.delayBeforeUnFocus,containerHeightIncludingBelowXAxis=_useLineChart.containerHeightIncludingBelowXAxis,lineGradient=_useLineChart.lineGradient,lineGradientDirection=_useLineChart.lineGradientDirection,lineGradientStartColor=_useLineChart.lineGradientStartColor,lineGradientEndColor=_useLineChart.lineGradientEndColor,barAndLineChartsWrapperProps=_useLineChart.barAndLineChartsWrapperProps;var secondaryXAxis=props.secondaryXAxis;var widthValuesFromSet=(0,_react.useMemo)(function(){return dataSet==null?void 0:dataSet.map(function(set){return new _reactNative.Animated.Value(0);});},[]);(0,_react.useEffect)(function(){if(animateOnDataChange){_reactNative.Animated.parallel(animations.map(function(anItem,index){var _data$index$value,_data$index;return _reactNative.Animated.timing(anItem,{toValue:(_data$index$value=(_data$index=data[index])==null?void 0:_data$index.value)!=null?_data$index$value:0,useNativeDriver:_reactNative.Platform.OS==='ios',duration:onDataChangeAnimationDuration});})).start();}},[animateOnDataChange,data,onDataChangeAnimationDuration]);var labelsAppear=(0,_react.useCallback)(function(){opacValue.setValue(0);_reactNative.Animated.timing(opacValue,{toValue:1,duration:500,easing:_reactNative.Easing.ease,useNativeDriver:false}).start();},[opacValue]);var appearingOpacity=opacValue.interpolate({inputRange:[0,1],outputRange:[0,1]});var decreaseWidth=(0,_react.useCallback)(function(){widthValue.setValue(0);_reactNative.Animated.timing(widthValue,{toValue:1,duration:animationDuration,easing:_reactNative.Easing.linear,useNativeDriver:false}).start();},[animationDuration,widthValue]);var decreaseWidth2=(0,_react.useCallback)(function(){widthValue2.setValue(0);_reactNative.Animated.timing(widthValue2,{toValue:1,duration:animationDuration,easing:_reactNative.Easing.linear,useNativeDriver:false}).start();},[animationDuration,widthValue2]);var decreaseWidth3=(0,_react.useCallback)(function(){widthValue3.setValue(0);_reactNative.Animated.timing(widthValue3,{toValue:1,duration:animationDuration,easing:_reactNative.Easing.linear,useNativeDriver:false}).start();},[animationDuration,widthValue3]);var decreaseWidth4=(0,_react.useCallback)(function(){widthValue4.setValue(0);_reactNative.Animated.timing(widthValue4,{toValue:1,duration:animationDuration,easing:_reactNative.Easing.linear,useNativeDriver:false}).start();},[animationDuration,widthValue4]);var decreaseWidth5=(0,_react.useCallback)(function(){widthValue5.setValue(0);_reactNative.Animated.timing(widthValue5,{toValue:1,duration:animationDuration,easing:_reactNative.Easing.linear,useNativeDriver:false}).start();},[animationDuration,widthValue5]);var decreaseWidthsFromSet=(0,_react.useCallback)(function(){dataSet==null?void 0:dataSet.map(function(set,index){var _widthValuesFromSet$i;widthValuesFromSet==null?void 0:(_widthValuesFromSet$i=widthValuesFromSet[index])==null?void 0:_widthValuesFromSet$i.setValue(0);if(widthValuesFromSet!=null&&widthValuesFromSet[index]){_reactNative.Animated.timing(widthValuesFromSet==null?void 0:widthValuesFromSet[index],{toValue:1,duration:animationDuration,easing:_reactNative.Easing.linear,useNativeDriver:false}).start();}});},[animationDuration,widthValuesFromSet]);(0,_react.useEffect)(function(){decreaseWidth();labelsAppear();widthValuesFromSet==null?void 0:widthValuesFromSet.forEach(function(item,index){setTimeout(function(){decreaseWidthsFromSet();},animateTogether?0:animationDuration*index);});setTimeout(function(){decreaseWidth2();},animateTogether?0:animationDuration);setTimeout(function(){decreaseWidth3();},animateTogether?0:animationDuration*2);setTimeout(function(){decreaseWidth4();},animateTogether?0:animationDuration*3);setTimeout(function(){decreaseWidth5();},animateTogether?0:animationDuration*4);},[animateTogether,animationDuration,decreaseWidth,decreaseWidth2,decreaseWidth3,decreaseWidth4,decreaseWidth5,labelsAppear]);var renderLabel=function renderLabel(top,index,label,labelTextStyle,labelComponent){var _secondaryXAxis$label,_props$xAxisLabelsHei;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:[{position:'absolute',bottom:top?containerHeight+60+((_secondaryXAxis$label=secondaryXAxis==null?void 0:secondaryXAxis.labelsDistanceFromXaxis)!=null?_secondaryXAxis$label:15):54-xAxisTextNumberOfLines*18,zIndex:10,width:spacing+labelsExtraHeight,left:index===0&&initialSpacing<10?initialSpacing/2+spacing*index-spacing/2+4:initialSpacing/2+spacing*index-spacing/2-10,height:(_props$xAxisLabelsHei=props.xAxisLabelsHeight)!=null?_props$xAxisLabelsHei:xAxisTextNumberOfLines*18},rotateLabel&&{transform:[{rotate:'60deg'}]}],children:labelComponent?labelComponent():(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{textAlign:'center'},labelTextStyle],numberOfLines:xAxisTextNumberOfLines,children:label})});};var renderAnimatedLabel=function renderAnimatedLabel(top,index,label,labelTextStyle,labelComponent){var _props$xAxisLabelsHei2,_secondaryXAxis$label2;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{style:[{height:rotateLabel?40:(_props$xAxisLabelsHei2=props.xAxisLabelsHeight)!=null?_props$xAxisLabelsHei2:xAxisTextNumberOfLines*18,position:'absolute',bottom:top?containerHeight+60+((_secondaryXAxis$label2=secondaryXAxis==null?void 0:secondaryXAxis.labelsDistanceFromXaxis)!=null?_secondaryXAxis$label2:15):rotateLabel?10:54-xAxisTextNumberOfLines*18,zIndex:10,width:spacing,left:index===0&&initialSpacing<10?initialSpacing/2+spacing*index-spacing/2+4:initialSpacing/2+spacing*index-spacing/2-10,opacity:appearingOpacity},rotateLabel&&{transform:[{rotate:'60deg'}]}],children:labelComponent?labelComponent():(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[{textAlign:'center'},labelTextStyle],numberOfLines:xAxisTextNumberOfLines,children:label})});};var animatedWidth=widthValue.interpolate({inputRange:[0,1],outputRange:[0,totalWidth]});var animatedWidth2=widthValue2.interpolate({inputRange:[0,1],outputRange:[0,totalWidth]});var animatedWidth3=widthValue3.interpolate({inputRange:[0,1],outputRange:[0,totalWidth]});var animatedWidth4=widthValue4.interpolate({inputRange:[0,1],outputRange:[0,totalWidth]});var animatedWidth5=widthValue5.interpolate({inputRange:[0,1],outputRange:[0,totalWidth]});var onStripPress=function onStripPress(item,index){if(props.focusedDataPointIndex===undefined||!props.onFocus){setSelectedIndex(index);}if(props.onFocus){props.onFocus(item,index);}};var renderDataPoints=function renderDataPoints(hideDataPoints,dataForRender,originalDataFromProps,dataPtsShape,dataPtsWidth,dataPtsHeight,dataPtsColor,dataPtsRadius,textColor,textFontSize,startIndex,endIndex,isSecondary,showValuesAsDataPointsText){var getYOrSecondaryY=isSecondary?getSecondaryY:getY;return dataForRender.map(function(item,index){var _item$stripHeight,_item$stripWidth,_item$stripOpacity,_ref2,_item$stripStrokeDash;if(index<startIndex||index>endIndex)return null;if(item.hideDataPoint){return null;}var dataPointsShape,dataPointsWidth,dataPointsHeight,dataPointsColor,dataPointsRadius,text,customDataPoint,dataPointLabelComponent;if(index===selectedIndex){dataPointsShape=item.focusedDataPointShape||props.focusedDataPointShape||item.dataPointShape||dataPtsShape;dataPointsWidth=item.focusedDataPointWidth||props.focusedDataPointWidth||item.dataPointWidth||dataPtsWidth;dataPointsHeight=item.focusedDataPointHeight||props.focusedDataPointHeight||item.dataPointHeight||dataPtsHeight;dataPointsColor=item.focusedDataPointColor||props.focusedDataPointColor||_giftedChartsCore.LineDefaults.focusedDataPointColor;dataPointsRadius=item.focusedDataPointRadius||props.focusedDataPointRadius||item.dataPointRadius||dataPtsRadius;if(showTextOnFocus){text=item.dataPointText;}customDataPoint=item.focusedCustomDataPoint||props.focusedCustomDataPoint||item.customDataPoint||props.customDataPoint;dataPointLabelComponent=item.focusedDataPointLabelComponent||item.dataPointLabelComponent;}else{dataPointsShape=item.dataPointShape||dataPtsShape;dataPointsWidth=item.dataPointWidth||dataPtsWidth;dataPointsHeight=item.dataPointHeight||dataPtsHeight;dataPointsColor=item.dataPointColor||dataPtsColor;dataPointsRadius=item.dataPointRadius||dataPtsRadius;if(showTextOnFocus){text='';}customDataPoint=item.customDataPoint||props.customDataPoint;dataPointLabelComponent=item.dataPointLabelComponent;}if(showValuesAsDataPointsText){text=originalDataFromProps[index].value;}var currentStripHeight=(_item$stripHeight=item.stripHeight)!=null?_item$stripHeight:stripHeight;var currentStripWidth=(_item$stripWidth=item.stripWidth)!=null?_item$stripWidth:stripWidth;var currentStripOpacity=(_item$stripOpacity=item.stripOpacity)!=null?_item$stripOpacity:stripOpacity;var currentStripStrokeDashArray=(_ref2=(_item$stripStrokeDash=item.stripStrokeDashArray)!=null?_item$stripStrokeDash:stripStrokeDashArray)!=null?_ref2:'';var currentStripColor=item.stripColor||stripColor;var position=_reactNative.I18nManager.isRTL?'right':'left';var y1=currentStripHeight?containerHeight-currentStripHeight+8:containerHeight-dataPointsHeight/2+14-item.value*containerHeight/maxValue;var actualStripHeight=currentStripHeight||item.value*containerHeight/maxValue-2+overflowTop;return(0,_jsxRuntime.jsxs)(_react.Fragment,{children:[focusEnabled?(0,_jsxRuntime.jsx)(_jsxRuntime.Fragment,{children:unFocusOnPressOut?(0,_jsxRuntime.jsx)(_reactNativeSvg.Rect,{onPressIn:function onPressIn(){return onStripPress(item,index);},onPressOut:function onPressOut(){return setTimeout(function(){return setSelectedIndex(-1);},delayBeforeUnFocus);},x:initialSpacing+(spacing*index-spacing/2),y:8,width:spacing,height:containerHeight-0,fill:'none'}):(0,_jsxRuntime.jsx)(_reactNativeSvg.Rect,{onPress:function onPress(){return onStripPress(item,index);},x:initialSpacing+(spacing*index-spacing/2),y:8,width:spacing,height:containerHeight,fill:'none'})}):null,item.showStrip||focusEnabled&&index===selectedIndex&&showStripOnFocus?(0,_jsxRuntime.jsx)(_reactNativeSvg.Line,{x1:initialSpacing+spacing*index-currentStripWidth/2-1,y1:y1,x2:initialSpacing+spacing*index-currentStripWidth/2-1,y2:y1+actualStripHeight,strokeWidth:currentStripWidth,stroke:currentStripColor,strokeDasharray:currentStripStrokeDashArray,opacity:currentStripOpacity}):null,hideDataPoints?null:(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[customDataPoint?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[_styles.styles.customDataPointContainer,(0,_defineProperty2.default)((0,_defineProperty2.default)({height:dataPointsHeight,width:dataPointsWidth,top:getYOrSecondaryY(item.value)},position,initialSpacing-dataPointsWidth+spacing*index),"transform",[{scaleX:_reactNative.I18nManager.isRTL?-1:1}])],children:customDataPoint(item,index)}):null,dataPointsShape==='rectangular'?(0,_jsxRuntime.jsx)(_react.Fragment,{children:customDataPoint?null:(0,_jsxRuntime.jsx)(_reactNativeSvg.Rect,{x:getX(index)-dataPointsWidth/2,y:getYOrSecondaryY(item.value)-dataPointsHeight/2,width:dataPointsWidth,height:dataPointsHeight,fill:showDataPointOnFocus?index===selectedIndex?dataPointsColor:'none':dataPointsColor,onPress:function onPress(){item.onPress?item.onPress(item,index):props.onPress?props.onPress(item,index):null;}})},index):(0,_jsxRuntime.jsx)(_react.Fragment,{children:customDataPoint?null:(0,_jsxRuntime.jsx)(_reactNativeSvg.Circle,{cx:getX(index),cy:getYOrSecondaryY(item.value),r:dataPointsRadius,fill:showDataPointOnFocus?index===selectedIndex?dataPointsColor:'none':dataPointsColor,onPress:function onPress(){item.onPress?item.onPress(item,index):props.onPress?props.onPress(item,index):null;}})},index),dataPointLabelComponent?!showTextOnFocus||index===selectedIndex?(0,_jsxRuntime.jsx)(_reactNative.View,{style:[_styles.styles.customDataPointContainer,{zIndex:index===selectedIndex?1000:0,top:containerHeight+(item.dataPointLabelShiftY||props.dataPointLabelShiftY||0)-item.value*containerHeight/maxValue,left:initialSpacing+(item.dataPointLabelShiftX||props.dataPointLabelShiftX||0)-(item.dataPointLabelWidth?item.dataPointLabelWidth+20:props.dataPointLabelWidth?props.dataPointLabelWidth+20:50)/2+spacing*index}],children:showDataPointLabelOnFocus?index===selectedIndex?dataPointLabelComponent():null:dataPointLabelComponent()}):null:text||item.dataPointText?!showTextOnFocus||index===selectedIndex?(0,_jsxRuntime.jsx)(_reactNativeSvg.Text,{fill:item.textColor||textColor,fontSize:item.textFontSize||textFontSize,x:getX(index)-dataPointsWidth+(item.textShiftX||props.textShiftX||0),y:getYOrSecondaryY(item.value)-dataPointsHeight/2+(item.textShiftY||props.textShiftY||0),children:!showTextOnFocus&&!showValuesAsDataPointsText?item.dataPointText:text}):null:null]})]},index);});};var renderSpecificVerticalLines=function renderSpecificVerticalLines(dataForRender){return dataForRender.map(function(item,index){if(item.showVerticalLine){var _item$verticalLineUpt,_ref4,_item$verticalLineStr;var x=getX(index);return(0,_jsxRuntime.jsx)(_reactNativeSvg.Line,{x1:x,y1:extendedContainerHeight,x2:x,y2:((_item$verticalLineUpt=item.verticalLineUptoDataPoint)!=null?_item$verticalLineUpt:props.verticalLinesUptoDataPoint)?getY(item.value):-xAxisThickness,stroke:item.verticalLineColor||props.verticalLinesColor||'lightgray',strokeWidth:item.verticalLineThickness||props.verticalLinesThickness||2,strokeDasharray:(_ref4=(_item$verticalLineStr=item.verticalLineStrokeDashArray)!=null?_item$verticalLineStr:props.verticalLinesStrokeDashArray)!=null?_ref4:''},index);}return null;});};var renderPointer=function renderPointer(lineNumber,isDataSet){if(isDataSet){var _pointerItemLocal,_pointerYLocal,_pointerColorLocal;return dataSet==null?void 0:dataSet.map(function(set,index){var _pointerConfig$pointe,_pointerConfig$pointe2;var pIndex=barAndLineChartsWrapperProps.pointerIndex;_pointerItemLocal=set[pIndex];_pointerYLocal=pointerYsForDataSet[index];_pointerColorLocal=(_pointerConfig$pointe=pointerConfig==null?void 0:(_pointerConfig$pointe2=pointerConfig.pointerColorsForDataSet)==null?void 0:_pointerConfig$pointe2[index])!=null?_pointerConfig$pointe:pointerColor;return(0,_jsxRuntime.jsx)(_react.Fragment,{children:(0,_Pointer.Pointer)({pointerX:pointerX,pointerYLocal:_pointerYLocal+xAxisThickness,pointerComponent:pointerComponent,pointerHeight:pointerHeight,pointerRadius:pointerRadius,pointerWidth:pointerWidth,pointerItemLocal:_pointerItemLocal,pointerColorLocal:_pointerColorLocal})},'dSetPts'+index);});}if(lineNumber===1&&hidePointer1)return;if(lineNumber===2&&hidePointer2)return;if(lineNumber===3&&hidePointer3)return;if(lineNumber===4&&hidePointer4)return;if(lineNumber===5&&hidePointer5)return;if(lineNumber===6&&hideSecondaryPointer)return;var pointerItemLocal,pointerYLocal,pointerColorLocal;switch(lineNumber){case 1:pointerItemLocal=pointerItem;pointerYLocal=pointerY;pointerColorLocal=(pointerConfig==null?void 0:pointerConfig.pointer1Color)||pointerColor;break;case 2:pointerItemLocal=pointerItem2;pointerYLocal=pointerY2;pointerColorLocal=(pointerConfig==null?void 0:pointerConfig.pointer2Color)||pointerColor;break;case 3:pointerItemLocal=pointerItem3;pointerYLocal=pointerY3;pointerColorLocal=(pointerConfig==null?void 0:pointerConfig.pointer3Color)||pointerColor;break;case 4:pointerItemLocal=pointerItem4;pointerYLocal=pointerY4;pointerColorLocal=(pointerConfig==null?void 0:pointerConfig.pointer4Color)||pointerColor;break;case 5:pointerItemLocal=pointerItem5;pointerYLocal=pointerY5;pointerColorLocal=(pointerConfig==null?void 0:pointerConfig.pointer5Color)||pointerColor;break;case 6:pointerItemLocal=secondaryPointerItem;pointerYLocal=secondaryPointerY;pointerColorLocal=(pointerConfig==null?void 0:pointerConfig.secondaryPointerColor)||pointerColor;break;}if(!pointerYLocal)return;return(0,_Pointer.Pointer)({pointerX:pointerX,pointerYLocal:pointerYLocal+xAxisThickness,pointerComponent:pointerComponent,pointerHeight:pointerHeight,pointerRadius:pointerRadius,pointerWidth:pointerWidth,pointerItemLocal:pointerItemLocal,pointerColorLocal:pointerColorLocal});};var renderStripAndLabel=function renderStripAndLabel(){var _props$data,_props$data$pointerIn;var pointerItemLocal,pointerYLocal;pointerItemLocal=[Object.assign({},pointerItem,{value:(_props$data=props.data)==null?void 0:(_props$data$pointerIn=_props$data[pointerIndex])==null?void 0:_props$data$pointerIn.value})];var arr=[pointerY];if(pointerY2!==0){var _props$data2,_props$data2$pointerI;arr.push(pointerY2);pointerItemLocal.push(Object.assign({},pointerItem,{value:(_props$data2=props.data2)==null?void 0:(_props$data2$pointerI=_props$data2[pointerIndex])==null?void 0:_props$data2$pointerI.value}));}if(pointerY3!==0){var _props$data3,_props$data3$pointerI;arr.push(pointerY3);pointerItemLocal.push(Object.assign({},pointerItem,{value:(_props$data3=props.data3)==null?void 0:(_props$data3$pointerI=_props$data3[pointerIndex])==null?void 0:_props$data3$pointerI.value}));}if(pointerY4!==0){var _props$data4,_props$data4$pointerI;arr.push(pointerY4);pointerItemLocal.push(Object.assign({},pointerItem,{value:(_props$data4=props.data4)==null?void 0:(_props$data4$pointerI=_props$data4[pointerIndex])==null?void 0:_props$data4$pointerI.value}));}if(pointerY5!==0){var _props$data5,_props$data5$pointerI;arr.push(pointerY5);pointerItemLocal.push(Object.assign({},pointerItem,{value:(_props$data5=props.data5)==null?void 0:(_props$data5$pointerI=_props$data5[pointerIndex])==null?void 0:_props$data5$pointerI.value}));}if(secondaryPointerY!==0){var _props$secondaryData,_props$secondaryData$;pointerItemLocal.push(Object.assign({},pointerItem,{value:(_props$secondaryData=props.secondaryData)==null?void 0:(_props$secondaryData$=_props$secondaryData[pointerIndex])==null?void 0:_props$secondaryData$.value}));}pointerYLocal=Math.min.apply(Math,arr);return(0,_StripAndLabel.StripAndLabel)({autoAdjustPointerLabelPosition:autoAdjustPointerLabelPosition,pointerX:pointerX,pointerLabelWidth:pointerLabelWidth,activatePointersOnLongPress:activatePointersOnLongPress,yAxisLabelWidth:yAxisLabelWidth,pointerRadius:pointerRadius,pointerWidth:pointerWidth,shiftPointerLabelX:shiftPointerLabelX,pointerLabelHeight:pointerLabelHeight,pointerYLocal:pointerYLocal,pointerStripUptoDataPoint:pointerStripUptoDataPoint,pointerStripHeight:pointerStripHeight,shiftPointerLabelY:shiftPointerLabelY,pointerItemLocal:pointerItemLocal,showPointerStrip:showPointerStrip,pointerStripWidth:pointerStripWidth,containerHeight:containerHeight,xAxisThickness:xAxisThickness,pointerStripColor:pointerStripColor,pointerConfig:pointerConfig,pointerLabelComponent:pointerLabelComponent,secondaryPointerItem:secondaryPointerItem,scrollX:scrollX,pointerEvents:pointerEvents});};var getLineGradientComponent=function getLineGradientComponent(){return props.lineGradientComponent?props.lineGradientComponent():(0,_jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient,{id:"lineGradient",x1:"0",y1:"0",x2:lineGradientDirection==='horizontal'?'1':'0',y2:lineGradientDirection==='vertical'?'1':'0',children:[(0,_jsxRuntime.jsx)(_reactNativeSvg.Stop,{offset:"0",stopColor:lineGradientStartColor}),(0,_jsxRuntime.jsx)(_reactNativeSvg.Stop,{offset:"1",stopColor:lineGradientEndColor})]});};var getAreaGradientComponent=function getAreaGradientComponent(startFillColor,endFillColor,startOpacity,endOpacity){return props.areaGradientComponent?props.areaGradientComponent():(0,_jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient,{id:"Gradient",x1:"0",y1:"0",x2:gradientDirection==='horizontal'?'1':'0',y2:gradientDirection==='vertical'?'1':'0',children:[(0,_jsxRuntime.jsx)(_reactNativeSvg.Stop,{offset:"0",stopColor:startFillColor,stopOpacity:startOpacity.toString()}),(0,_jsxRuntime.jsx)(_reactNativeSvg.Stop,{offset:"1",stopColor:endFillColor,stopOpacity:endOpacity.toString()})]});};var lineSvgComponent=function lineSvgComponent(points,currentLineThickness,color,fillPoints,startFillColor,endFillColor,startOpacity,endOpacity,strokeDashArray,showArrow,arrowPoints,arrowStrokeWidth,arrowStrokeColor,arrowFillColor,key){var _dataSet$map,_dataSet$map2;if(!points)return null;var isCurved=points.includes('C');var isNthAreaChart=getIsNthAreaChart(key!=null?key:0);var ar=[{d:'',color:'',strokeWidth:0}];if(points.includes(_giftedChartsCore.RANGE_ENTER)){ar=(0,_giftedChartsCore.getRegionPathObjects)(points,color,currentLineThickness!=null?currentLineThickness:0,thickness,strokeDashArray!=null?strokeDashArray:[],isCurved,_giftedChartsCore.RANGE_ENTER,_giftedChartsCore.STOP,_giftedChartsCore.RANGE_EXIT);}else if(points.includes(_giftedChartsCore.SEGMENT_START)){ar=(0,_giftedChartsCore.getSegmentedPathObjects)(points,color,currentLineThickness!=null?currentLineThickness:0,thickness,strokeDashArray!=null?strokeDashArray:[],isCurved,_giftedChartsCore.SEGMENT_START,_giftedChartsCore.SEGMENT_END);}var lineSvgPropsOuter={d:points,fill:'none',stroke:lineGradient?props.lineGradientId?`url(#${props.lineGradientId})`:`url(#lineGradient)`:color,strokeWidth:currentLineThickness||thickness};if(strokeDashArray&&strokeDashArray.length===2&&typeof strokeDashArray[0]==='number'&&typeof strokeDashArray[1]==='number'){lineSvgPropsOuter.strokeDasharray=strokeDashArray;}return(0,_jsxRuntime.jsxs)(_reactNativeSvg.default,{onPress:props.onBackgroundPress,children:[lineGradient&&getLineGradientComponent(),points.includes(_giftedChartsCore.SEGMENT_START)||points.includes(_giftedChartsCore.RANGE_ENTER)?ar.map(function(item,index){var lineSvgProps={d:item.d,fill:'none',stroke:lineGradient?props.lineGradientId?`url(#${props.lineGradientId})`:`url(#lineGradient)`:item.color,strokeWidth:item.strokeWidth};if(item.strokeDashArray&&item.strokeDashArray.length===2&&typeof item.strokeDashArray[0]==='number'&&typeof item.strokeDashArray[1]==='number'){lineSvgProps.strokeDasharray=item.strokeDashArray;}return(0,_jsxRuntime.jsx)(_reactNativeSvg.Path,Object.assign({},lineSvgProps),index);}):(0,_jsxRuntime.jsx)(_reactNativeSvg.Path,Object.assign({},lineSvgPropsOuter)),isNthAreaChart&&getAreaGradientComponent(startFillColor,endFillColor,startOpacity,endOpacity),isNthAreaChart&&(0,_jsxRuntime.jsx)(_reactNativeSvg.Path,{onPress:props.onChartAreaPress,d:fillPoints,fill:props.areaGradientId?`url(#${props.areaGradientId})`:`url(#Gradient)`,stroke:'transparent',strokeWidth:currentLineThickness||thickness}),renderSpecificVerticalLines(data),renderSpecificVerticalLines(data2),renderSpecificVerticalLines(data3),renderSpecificVerticalLines(data4),renderSpecificVerticalLines(data5),(_dataSet$map=dataSet==null?void 0:dataSet.map(function(set){return renderSpecificVerticalLines(set==null?void 0:set.data);}))!=null?_dataSet$map:null,(_dataSet$map2=dataSet==null?void 0:dataSet.map(function(set){var _set$hideDataPoints,_props$yAxisOffset,_set$dataPointsShape,_set$dataPointsWidth,_set$dataPointsHeight,_set$dataPointsColor,_set$dataPointsRadius,_set$textColor,_set$textFontSize,_set$startIndex,_set$endIndex;return renderDataPoints((_set$hideDataPoints=set.hideDataPoints)!=null?_set$hideDataPoints:hideDataPoints1,set.data,(0,_giftedChartsCore.adjustToOffset)(set.data,-((_props$yAxisOffset=props.yAxisOffset)!=null?_props$yAxisOffset:0)),(_set$dataPointsShape=set.dataPointsShape)!=null?_set$dataPointsShape:dataPointsShape1,(_set$dataPointsWidth=set.dataPointsWidth)!=null?_set$dataPointsWidth:dataPointsWidth1,(_set$dataPointsHeight=set.dataPointsHeight)!=null?_set$dataPointsHeight:dataPointsHeight1,(_set$dataPointsColor=set.dataPointsColor)!=null?_set$dataPointsColor:dataPointsColor1,(_set$dataPointsRadius=set.dataPointsRadius)!=null?_set$dataPointsRadius:dataPointsRadius1,(_set$textColor=set.textColor)!=null?_set$textColor:textColor1,(_set$textFontSize=set.textFontSize)!=null?_set$textFontSize:textFontSize1,(_set$startIndex=set.startIndex)!=null?_set$startIndex:0,(_set$endIndex=set.endIndex)!=null?_set$endIndex:set.data.length-1,set.isSecondary,showValuesAsDataPointsText);}))!=null?_dataSet$map2:null,renderDataPoints(hideDataPoints1,data,props.data,dataPointsShape1,dataPointsWidth1,dataPointsHeight1,dataPointsColor1,dataPointsRadius1,textColor1,textFontSize1,startIndex1,endIndex1,false,showValuesAsDataPointsText),renderDataPoints(hideDataPoints2,data2,props.data2,dataPointsShape2,dataPointsWidth2,dataPointsHeight2,dataPointsColor2,dataPointsRadius2,textColor2,textFontSize2,startIndex2,endIndex2,false,showValuesAsDataPointsText),renderDataPoints(hideDataPoints3,data3,props.data3,dataPointsShape3,dataPointsWidth3,dataPointsHeight3,dataPointsColor3,dataPointsRadius3,textColor3,textFontSize3,startIndex3,endIndex3,false,showValuesAsDataPointsText),renderDataPoints(hideDataPoints4,data4,props.data4,dataPointsShape4,dataPointsWidth4,dataPointsHeight4,dataPointsColor4,dataPointsRadius4,textColor4,textFontSize4,startIndex4,endIndex4,false,showValuesAsDataPointsText),renderDataPoints(hideDataPoints5,data5,props.data5,dataPointsShape5,dataPointsWidth5,dataPointsHeight5,dataPointsColor5,dataPointsRadius5,textColor5,textFontSize5,startIndex5,endIndex5,false,showValuesAsDataPointsText),secondaryData!=null&&secondaryData.length?renderDataPoints(secondaryLineConfig.hideDataPoints,secondaryData,props.secondaryData,secondaryLineConfig.dataPointsShape,secondaryLineConfig.dataPointsWidth,secondaryLineConfig.dataPointsHeight,secondaryLineConfig.dataPointsColor,secondaryLineConfig.dataPointsRadius,secondaryLineConfig.textColor,secondaryLineConfig.textFontSize,secondaryLineConfig.startIndex,secondaryLineConfig.endIndex,true,secondaryLineConfig.showValuesAsDataPointsText):null,showArrow&&(0,_jsxRuntime.jsx)(_reactNativeSvg.Path,{d:arrowPoints,fill:arrowFillColor,stroke:arrowStrokeColor,strokeWidth:arrowStrokeWidth})]});};var activatePointers=function activatePointers(x){var factor=(x-initialSpacing)/spacing;factor=Math.round(factor);factor=Math.min(factor,(data0!=null?data0:data).length-1);factor=Math.max(factor,0);var z=initialSpacing+spacing*factor-(pointerRadius||pointerWidth/2)-1;setPointerX(z);setPointerIndex(factor);var item,y;item=(data0!=null?data0:data)[factor];y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY(y);setPointerItem(item);if(data2&&data2.length){item=data2[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY2(y);setPointerItem2(item);}}if(data3&&data3.length){item=data3[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY3(y);setPointerItem3(item);}}if(data4&&data4.length){item=data4[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY4(y);setPointerItem4(item);}}if(data5&&data5.length){item=data5[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY5(y);setPointerItem5(item);}}if(secondaryData!=null&&secondaryData.length){item=secondaryData[factor];if(item){y=containerHeight-item.value*containerHeight/secondaryMaxValue-(pointerRadius||pointerHeight/2)+10;setSecondaryPointerY(y);setSecondaryPointerItem(item);}}if(dataSet!=null&&dataSet.length){if(dataSet[0].data[factor]){var ysForDataSet=dataSet.map(function(set){var item=set.data[factor];var y=item?containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10:0;return y;});setPointerYsForDataSet(ysForDataSet);}}};var renderLine=function renderLine(zIndex,points,currentLineThickness,color,fillPoints,startFillColor,endFillColor,startOpacity,endOpacity,strokeDashArray,showArrow,arrowPoints,arrowStrokeWidth,arrowStrokeColor,arrowFillColor,key){var _props$overflowBottom,_props$overflowBottom2;return(0,_jsxRuntime.jsx)(_reactNative.View,{onMoveShouldSetResponder:function onMoveShouldSetResponder(evt){return pointerConfig?true:false;},onResponderGrant:function onResponderGrant(evt){if(!pointerConfig)return;setResponderStartTime(evt.timeStamp);if(activatePointersOnLongPress){return;}var x=evt.nativeEvent.locationX;activatePointers(x);},onResponderMove:function onResponderMove(evt){if(!pointerConfig)return;if(activatePointersOnLongPress&&evt.timeStamp-responderStartTime<activatePointersDelay){return;}else{setResponderActive(true);}var x=evt.nativeEvent.locationX;if(!activatePointersOnLongPress&&x>(props.width||_reactNative.Dimensions.get('window').width))return;var factor=(x-initialSpacing)/spacing;factor=Math.round(factor);factor=Math.min(factor,(data0!=null?data0:data).length-1);factor=Math.max(factor,0);var z=initialSpacing+spacing*factor-(pointerRadius||pointerWidth/2)-1;var item,y;setPointerX(z);setPointerIndex(factor);item=(data0!=null?data0:data)[factor];y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY(y);setPointerItem(item);if(data2&&data2.length){item=data2[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY2(y);setPointerItem2(item);}}if(data3&&data3.length){item=data3[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY3(y);setPointerItem3(item);}}if(data4&&data4.length){item=data4[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY4(y);setPointerItem4(item);}}if(data5&&data5.length){item=data5[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY5(y);setPointerItem5(item);}}if(secondaryData!=null&&secondaryData.length){item=secondaryData[factor];if(item){y=containerHeight-item.value*containerHeight/secondaryMaxValue-(pointerRadius||pointerHeight/2)+10;setSecondaryPointerY(y);setSecondaryPointerItem(item);}}if(dataSet!=null&&dataSet.length){var ysForDataSet=dataSet.map(function(set){var item=set.data[factor];var y=item?containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10:0;return y;});setPointerYsForDataSet(ysForDataSet);}},onResponderEnd:function onResponderEnd(evt){setResponderStartTime(0);setPointerIndex(-1);setResponderActive(false);if(!persistPointer)setTimeout(function(){return setPointerX(0);},pointerVanishDelay);},onResponderTerminationRequest:function onResponderTerminationRequest(evt){return false;},style:{position:'absolute',height:containerHeightIncludingBelowXAxis+((_props$overflowBottom=props.overflowBottom)!=null?_props$overflowBottom:dataPointsRadius1),bottom:60+xAxisLabelsVerticalShift+labelsExtraHeight-xAxisThickness-((_props$overflowBottom2=props.overflowBottom)!=null?_props$overflowBottom2:dataPointsRadius1),zIndex:zIndex,transform:[{scaleX:_reactNative.I18nManager.isRTL?-1:1}],width:totalWidth},children:lineSvgComponent(points,currentLineThickness,color,fillPoints,startFillColor,endFillColor,startOpacity,endOpacity,strokeDashArray,showArrow,arrowPoints,arrowStrokeWidth,arrowStrokeColor,arrowFillColor,key)},key!=null?key:0);};var renderAnimatedLine=function renderAnimatedLine(zIndex,points,animatedWidth,currentLineThickness,color,fillPoints,startFillColor,endFillColor,startOpacity,endOpacity,strokeDashArray,showArrow,arrowPoints,arrowStrokeWidth,arrowStrokeColor,arrowFillColor,key){var _props$overflowBottom3,_props$overflowBottom4;return(0,_jsxRuntime.jsx)(_reactNative.Animated.View,{onStartShouldSetResponder:function onStartShouldSetResponder(evt){return pointerConfig?true:false;},onMoveShouldSetResponder:function onMoveShouldSetResponder(evt){return pointerConfig?true:false;},onResponderGrant:function onResponderGrant(evt){if(!pointerConfig)return;setResponderStartTime(evt.timeStamp);if(activatePointersOnLongPress){return;}var x=evt.nativeEvent.locationX;activatePointers(x);},onResponderMove:function onResponderMove(evt){if(!pointerConfig)return;if(activatePointersOnLongPress&&evt.timeStamp-responderStartTime<activatePointersDelay){return;}else{setResponderActive(true);}var x=evt.nativeEvent.locationX;if(!activatePointersOnLongPress&&x>(props.width||_reactNative.Dimensions.get('window').width))return;var factor=(x-initialSpacing)/spacing;factor=Math.round(factor);factor=Math.min(factor,(data0!=null?data0:data).length-1);factor=Math.max(factor,0);var z=initialSpacing+spacing*factor-(pointerRadius||pointerWidth/2)-1;var item,y;setPointerX(z);setPointerIndex(factor);item=(data0!=null?data0:data)[factor];y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY(y);setPointerItem(item);if(data2&&data2.length){item=data2[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY2(y);setPointerItem2(item);}}if(data3&&data3.length){item=data3[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY3(y);setPointerItem3(item);}}if(data4&&data4.length){item=data4[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY4(y);setPointerItem4(item);}}if(data5&&data5.length){item=data5[factor];if(item){y=containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10;setPointerY5(y);setPointerItem5(item);}}if(secondaryData!=null&&secondaryData.length){item=secondaryData[factor];if(item){y=containerHeight-item.value*containerHeight/secondaryMaxValue-(pointerRadius||pointerHeight/2)+10;setSecondaryPointerY(y);setSecondaryPointerItem(item);}}if(dataSet!=null&&dataSet.length){if(dataSet[0].data[factor]){var ysForDataSet=dataSet.map(function(set){var item=set.data[factor];var y=item?containerHeight-item.value*containerHeight/maxValue-(pointerRadius||pointerHeight/2)+10:0;return y;});setPointerYsForDataSet(ysForDataSet);}}},onResponderEnd:function onResponderEnd(evt){setResponderStartTime(0);setPointerIndex(-1);setResponderActive(false);if(!persistPointer)setTimeout(function(){return setPointerX(0);},pointerVanishDelay);},onResponderTerminationRequest:function onResponderTerminationRequest(evt){return false;},style:{position:'absolute',height:containerHeightIncludingBelowXAxis+((_props$overflowBottom3=props.overflowBottom)!=null?_props$overflowBottom3:dataPointsRadius1),bottom:60+xAxisLabelsVerticalShift+labelsExtraHeight-xAxisThickness-((_props$overflowBottom4=props.overflowBottom)!=null?_props$overflowBottom4:dataPointsRadius1),zIndex:zIndex,transform:[{scaleX:_reactNative.I18nManager.isRTL?-1:1}],width:animatedWidth},children:lineSvgComponent(points,currentLineThickness,color,fillPoints,startFillColor,endFillColor,startOpacity,endOpacity,strokeDashArray,showArrow,arrowPoints,arrowStrokeWidth,arrowStrokeColor,arrowFillColor,key)},key!=null?key:0);};var remainingScrollViewProps={onScroll:function onScroll(ev){props.onScroll==null?void 0:props.onScroll(ev);if(pointerConfig&&pointerConfig.activatePointersOnLongPress&&pointerConfig.autoAdjustPointerLabelPosition){setScrollX(ev.nativeEvent.contentOffset.x);}}};var renderChartContent=function renderChartContent(){var _secondaryLineConfig$,_secondaryLineConfig$2,_secondaryLineConfig$3,_secondaryLineConfig$4,_secondaryLineConfig$5,_secondaryLineConfig$6;return(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[dataSet?pointsFromSet.length?dataSet.map(function(set,index){if(isAnimated){var _set$zIndex,_set$thickness,_set$color,_set$startFillColor,_set$endFillColor,_set$startOpacity,_set$endOpacity,_set$strokeDashArray;return renderAnimatedLine((_set$zIndex=set.zIndex)!=null?_set$zIndex:zIndex1,pointsFromSet[index],animatedWidth,(_set$thickness=set.thickness)!=null?_set$thickness:thickness1,(_set$color=set.color)!=null?_set$color:color1,fillPointsFromSet[index],(_set$startFillColor=set.startFillColor)!=null?_set$startFillColor:startFillColor1,(_set$endFillColor=set.endFillColor)!=null?_set$endFillColor:endFillColor1,(_set$startOpacity=set.startOpacity)!=null?_set$startOpacity:startOpacity1,(_set$endOpacity=set.endOpacity)!=null?_set$endOpacity:endOpacity1,(_set$strokeDashArray=set.strokeDashArray)!=null?_set$strokeDashArray:strokeDashArray1,set.showArrow||props.showArrows,arrowPointsFromSet[index],arrowStrokeWidthsFromSet==null?void 0:arrowStrokeWidthsFromSet[index],arrowStrokeColorsFromSet==null?void 0:arrowStrokeColorsFromSet[index],arrowFillColorsFromSet==null?void 0:arrowFillColorsFromSet[index],index);}else{var _set$zIndex2,_set$thickness2,_set$color2,_set$startFillColor2,_set$endFillColor2,_set$startOpacity2,_set$endOpacity2,_set$strokeDashArray2;return renderLine((_set$zIndex2=set.zIndex)!=null?_set$zIndex2:zIndex1,pointsFromSet[index],(_set$thickness2=set.thickness)!=null?_set$thickness2:thickness1,(_set$color2=set.color)!=null?_set$color2:color1,fillPointsFromSet[index],(_set$startFillColor2=set.startFillColor)!=null?_set$startFillColor2:startFillColor1,(_set$endFillColor2=set.endFillColor)!=null?_set$endFillColor2:endFillColor1,(_set$startOpacity2=set.startOpacity)!=null?_set$startOpacity2:startOpacity1,(_set$endOpacity2=set.endOpacity)!=null?_set$endOpacity2:endOpacity1,(_set$strokeDashArray2=set.strokeDashArray)!=null?_set$strokeDashArray2:strokeDashArray1,set.showArrow||props.showArrows,arrowPointsFromSet[index],arrowStrokeWidthsFromSet==null?void 0:arrowStrokeWidthsFromSet[index],arrowStrokeColorsFromSet==null?void 0:arrowStrokeColorsFromSet[index],arrowFillColorsFromSet==null?void 0:arrowFillColorsFromSet[index],index);}}):null:isAnimated?renderAnimatedLine(zIndex1,points,animatedWidth,thickness1,color1,fillPoints,startFillColor1,endFillColor1,startOpacity1,endOpacity1,strokeDashArray1,props.showArrow1||props.showArrows,arrow1Points,arrowStrokeWidth1,arrowStrokeColor1,arrowFillColor1,0):renderLine(zIndex1,points,thickness1,color1,fillPoints,startFillColor1,endFillColor1,startOpacity1,endOpacity1,strokeDashArray1,props.showArrow1||props.showArrows,arrow1Points,arrowStrokeWidth1,arrowStrokeColor1,arrowFillColor1,0),secondaryPoints?isAnimated?renderAnimatedLine(secondaryLineConfig.zIndex,secondaryPoints,animatedWidth,secondaryLineConfig.thickness,secondaryLineConfig.color,secondaryFillPoints,secondaryLineConfig.startFillColor,secondaryLineConfig.endFillColor,secondaryLineConfig.startOpacity,secondaryLineConfig.endOpacity,secondaryLineConfig.strokeDashArray,secondaryLineConfig.showArrow,secondaryArrowPoints,(_secondaryLineConfig$=secondaryLineConfig.arrowConfig)==null?void 0:_secondaryLineConfig$.strokeWidth,(_secondaryLineConfig$2=secondaryLineConfig.arrowConfig)==null?void 0:_secondaryLineConfig$2.strokeColor,(_secondaryLineConfig$3=secondaryLineConfig.arrowConfig)==null?void 0:_secondaryLineConfig$3.fillColor,6):renderLine(secondaryLineConfig.zIndex,secondaryPoints,secondaryLineConfig.thickness,secondaryLineConfig.color,secondaryFillPoints,secondaryLineConfig.startFillColor,secondaryLineConfig.endFillColor,secondaryLineConfig.startOpacity,secondaryLineConfig.endOpacity,secondaryLineConfig.strokeDashArray,secondaryLineConfig.showArrow,secondaryArrowPoints,(_secondaryLineConfig$4=secondaryLineConfig.arrowConfig)==null?void 0:_secondaryLineConfig$4.strokeWidth,(_secondaryLineConfig$5=secondaryLineConfig.arrowConfig)==null?void 0:_secondaryLineConfig$5.strokeColor,(_secondaryLineConfig$6=secondaryLineConfig.arrowConfig)==null?void 0:_secondaryLineConfig$6.fillColor,6):null,points2?isAnimated?renderAnimatedLine(zIndex2,points2,animatedWidth2,thickness2,color2,fillPoints2,startFillColor2,endFillColor2,startOpacity2,endOpacity2,strokeDashArray2,props.showArrow2||props.showArrows,arrow2Points,arrowStrokeWidth2,arrowStrokeColor2,arrowFillColor2,1):renderLine(zIndex2,points2,thickness2,color2,fillPoints2,startFillColor2,endFillColor2,startOpacity2,endOpacity2,strokeDashArray2,props.showArrow2||props.showArrows,arrow2Points,arrowStrokeWidth2,arrowStrokeColor2,arrowFillColor2,1):null,points3?isAnimated?renderAnimatedLine(zIndex3,points3,animatedWidth3,thickness3,color3,fillPoints3,startFillColor3,endFillColor3,startOpacity3,endOpacity3,strokeDashArray3,props.showArrow3||props.showArrows,arrow3Points,arrowStrokeWidth3,arrowStrokeColor3,arrowFillColor3,2):renderLine(zIndex3,points3,thickness3,color3,fillPoints3,startFillColor3,endFillColor3,startOpacity3,endOpacity3,strokeDashArray3,props.showArrow3||props.showArrows,arrow3Points,arrowStrokeWidth3,arrowStrokeColor3,arrowFillColor3,2):null,points4?isAnimated?renderAnimatedLine(zIndex4,points4,animatedWidth4,thickness4,color4,fillPoints4,startFillColor4,endFillColor4,startOpacity4,endOpacity4,strokeDashArray4,props.showArrow4||props.showArrows,arrow4Points,arrowStrokeWidth4,arrowStrokeColor4,arrowFillColor4,3):renderLine(zIndex4,points4,thickness4,color4,fillPoints4,startFillColor4,endFillColor4,startOpacity4,endOpacity4,strokeDashArray4,props.showArrow4||props.showArrows,arrow4Points,arrowStrokeWidth4,arrowStrokeColor4,arrowFillColor4,3):null,points5?isAnimated?renderAnimatedLine(zIndex5,points5,animatedWidth5,thickness5,color5,fillPoints5,startFillColor5,endFillColor5,startOpacity5,endOpacity5,strokeDashArray5,props.showArrow5||props.showArrows,arrow5Points,arrowStrokeWidth5,arrowStrokeColor5,arrowFillColor5,4):renderLine(zIndex5,points5,thickness5,color5,fillPoints5,startFillColor5,endFillColor5,startOpacity5,endOpacity5,strokeDashArray5,props.showArrow5||props.showArrows,arrow5Points,arrowStrokeWidth5,arrowStrokeColor5,arrowFillColor5,4):null,pointerX>0?(0,_jsxRuntime.jsxs)(_reactNative.View,{pointerEvents:pointerEvents!=null?pointerEvents:'none',style:{position:'absolute',height:extendedContainerHeight+noOfSectionsBelowXAxis*stepHeight,bottom:58+labelsExtraHeight+xAxisLabelsVerticalShift-overflowTop,zIndex:20},children:[!stripOverPointer&&renderStripAndLabel(),dataSet?renderPointer(0,true):(0,_jsxRuntime.jsxs)(_jsxRuntime.Fragment,{children:[renderPointer(1),points2?renderPointer(2):null,points3?renderPointer(3):null,points4?renderPointer(4):null,points5?renderPointer(5):null,secondaryPoints?renderPointer(6):null,stripOverPointer&&renderStripAndLabel()]})]}):null,(data0!=null?data0:data).map(function(item,index){var _ref5,_item$secondaryLabel,_secondaryXAxis$label3,_ref6,_ref7,_item$secondaryLabelT;var secondaryLabel=(_ref5=(_item$secondaryLabel=item.secondaryLabel)!=null?_item$secondaryLabel:secondaryXAxis==null?void 0:(_secondaryXAxis$label3=secondaryXAxis.labelTexts)==null?void 0:_secondaryXAxis$label3[index])!=null?_ref5:'';var secondaryLabelTextStyle=(_ref6=(_ref7=(_item$secondaryLabelT=item.secondaryLabelTextStyle)!=null?_item$secondaryLabelT:secondaryXAxis==null?void 0:secondaryXAxis.labelsTextStyle)!=null?_ref7:item.labelTextStyle)!=null?_ref6:props.xAxisLabelTextStyle;return(0,_jsxRuntime.jsxs)(_reactNative.View,{children:[isAnimated?renderAnimatedLabel(false,index,item.label||(props.xAxisLabelTexts&&props.xAxisLabelTexts[index]?props.xAxisLabelTexts[index]:''),item.labelTextStyle||props.xAxisLabelTextStyle,item.labelComponent):renderLabel(false,index,item.label||(props.xAxisLabelTexts&&props.xAxisLabelTexts[index]?props.xAxisLabelTexts[index]:''),item.labelTextStyle||props.xAxisLabelTextStyle,item.labelComponent),secondaryXAxis?isAnimated?renderAnimatedLabel(true,index,secondaryLabel,secondaryLabelTextStyle,item.secondaryLabelComponent):renderLabel(true,index,secondaryLabel,secondaryLabelTextStyle,item.secondaryLabelComponent):null]},index);})]});};return(0,_jsxRuntime.jsx)(_BarAndLineChartsWrapper.default,Object.assign({},barAndLineChartsWrapperProps,{scrollRef:scrollRef,animatedWidth:animatedWidth,renderChartContent:renderChartContent,remainingScrollViewProps:remainingScrollViewProps}));};
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
29
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
30
+ if (ar || !(i in from)) {
31
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
32
+ ar[i] = from[i];
33
+ }
34
+ }
35
+ return to.concat(ar || Array.prototype.slice.call(from));
36
+ };
37
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
38
+ import { Fragment, useCallback, useEffect, useMemo, useRef } from 'react';
39
+ import { View, Animated, Easing, Text, Dimensions, Platform, I18nManager, } from 'react-native';
40
+ import { styles } from './styles';
41
+ import { screenWidth } from '../utils';
42
+ import Svg, { Path, LinearGradient, Stop, Circle, Rect, Text as CanvasText, Line, } from 'react-native-svg';
43
+ import { getSegmentedPathObjects, getRegionPathObjects, RANGE_ENTER, RANGE_EXIT, SEGMENT_END, SEGMENT_START, STOP, useLineChart, adjustToOffset, LineDefaults, } from 'gifted-charts-core';
44
+ import BarAndLineChartsWrapper from '../Components/BarAndLineChartsWrapper';
45
+ import { StripAndLabel } from '../Components/common/StripAndLabel';
46
+ import { Pointer } from '../Components/common/Pointer';
47
+ var initialData = null;
48
+ var animations = [];
49
+ export var LineChart = function (props) {
50
+ var _a, _b, _c, _d, _e, _f;
51
+ var scrollRef = (_a = props.scrollRef) !== null && _a !== void 0 ? _a : useRef(null);
52
+ var opacValue = useMemo(function () { return new Animated.Value(0); }, []);
53
+ var heightValue = useMemo(function () { return new Animated.Value(0); }, []);
54
+ var widthValue = useMemo(function () { return new Animated.Value(0); }, []);
55
+ var widthValue2 = useMemo(function () { return new Animated.Value(0); }, []);
56
+ var widthValue3 = useMemo(function () { return new Animated.Value(0); }, []);
57
+ var widthValue4 = useMemo(function () { return new Animated.Value(0); }, []);
58
+ var widthValue5 = useMemo(function () { return new Animated.Value(0); }, []);
59
+ if (!initialData) {
60
+ initialData = (_e = (_d = (_c = (_b = props.dataSet) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.data) !== null && _d !== void 0 ? _d : props.data) !== null && _e !== void 0 ? _e : [];
61
+ animations = initialData
62
+ .filter(function (item) { return item.value; })
63
+ .map(function (item) { return new Animated.Value(item.value); });
64
+ }
65
+ var _g = useLineChart(__assign(__assign({}, props), { animations: animations, parentWidth: (_f = props.parentWidth) !== null && _f !== void 0 ? _f : screenWidth })), scrollX = _g.scrollX, setScrollX = _g.setScrollX, arrow1Points = _g.arrow1Points, arrow2Points = _g.arrow2Points, arrow3Points = _g.arrow3Points, arrow4Points = _g.arrow4Points, arrow5Points = _g.arrow5Points, secondaryArrowPoints = _g.secondaryArrowPoints, pointerIndex = _g.pointerIndex, setPointerIndex = _g.setPointerIndex, pointerX = _g.pointerX, setPointerX = _g.setPointerX, pointerY = _g.pointerY, setPointerY = _g.setPointerY, pointerItem = _g.pointerItem, setPointerItem = _g.setPointerItem, pointerY2 = _g.pointerY2, setPointerY2 = _g.setPointerY2, pointerItem2 = _g.pointerItem2, setPointerItem2 = _g.setPointerItem2, pointerY3 = _g.pointerY3, setPointerY3 = _g.setPointerY3, pointerItem3 = _g.pointerItem3, setPointerItem3 = _g.setPointerItem3, pointerY4 = _g.pointerY4, setPointerY4 = _g.setPointerY4, pointerItem4 = _g.pointerItem4, setPointerItem4 = _g.setPointerItem4, pointerY5 = _g.pointerY5, setPointerY5 = _g.setPointerY5, pointerYsForDataSet = _g.pointerYsForDataSet, setPointerYsForDataSet = _g.setPointerYsForDataSet, pointerItem5 = _g.pointerItem5, setPointerItem5 = _g.setPointerItem5, secondaryPointerY = _g.secondaryPointerY, setSecondaryPointerY = _g.setSecondaryPointerY, secondaryPointerItem = _g.secondaryPointerItem, setSecondaryPointerItem = _g.setSecondaryPointerItem, responderStartTime = _g.responderStartTime, setResponderStartTime = _g.setResponderStartTime, setResponderActive = _g.setResponderActive, points = _g.points, points2 = _g.points2, points3 = _g.points3, points4 = _g.points4, points5 = _g.points5, secondaryPoints = _g.secondaryPoints, fillPoints = _g.fillPoints, fillPoints2 = _g.fillPoints2, fillPoints3 = _g.fillPoints3, fillPoints4 = _g.fillPoints4, fillPoints5 = _g.fillPoints5, secondaryFillPoints = _g.secondaryFillPoints, pointsFromSet = _g.pointsFromSet, fillPointsFromSet = _g.fillPointsFromSet, arrowPointsFromSet = _g.arrowPointsFromSet, selectedIndex = _g.selectedIndex, setSelectedIndex = _g.setSelectedIndex, containerHeight = _g.containerHeight, data = _g.data, data2 = _g.data2, data3 = _g.data3, data4 = _g.data4, data5 = _g.data5, secondaryData = _g.secondaryData, dataSet = _g.dataSet, data0 = _g.data0, labelsExtraHeight = _g.labelsExtraHeight, animationDuration = _g.animationDuration, onDataChangeAnimationDuration = _g.onDataChangeAnimationDuration, animateTogether = _g.animateTogether, animateOnDataChange = _g.animateOnDataChange, startIndex1 = _g.startIndex1, startIndex2 = _g.startIndex2, endIndex1 = _g.endIndex1, endIndex2 = _g.endIndex2, startIndex3 = _g.startIndex3, endIndex3 = _g.endIndex3, startIndex4 = _g.startIndex4, endIndex4 = _g.endIndex4, startIndex5 = _g.startIndex5, endIndex5 = _g.endIndex5, initialSpacing = _g.initialSpacing, thickness = _g.thickness, yAxisLabelWidth = _g.yAxisLabelWidth, spacing = _g.spacing, xAxisThickness = _g.xAxisThickness, dataPointsHeight1 = _g.dataPointsHeight1, dataPointsWidth1 = _g.dataPointsWidth1, dataPointsRadius1 = _g.dataPointsRadius1, dataPointsColor1 = _g.dataPointsColor1, dataPointsShape1 = _g.dataPointsShape1, dataPointsHeight2 = _g.dataPointsHeight2, dataPointsWidth2 = _g.dataPointsWidth2, dataPointsRadius2 = _g.dataPointsRadius2, dataPointsColor2 = _g.dataPointsColor2, dataPointsShape2 = _g.dataPointsShape2, dataPointsHeight3 = _g.dataPointsHeight3, dataPointsWidth3 = _g.dataPointsWidth3, dataPointsRadius3 = _g.dataPointsRadius3, dataPointsColor3 = _g.dataPointsColor3, dataPointsShape3 = _g.dataPointsShape3, dataPointsHeight4 = _g.dataPointsHeight4, dataPointsWidth4 = _g.dataPointsWidth4, dataPointsRadius4 = _g.dataPointsRadius4, dataPointsColor4 = _g.dataPointsColor4, dataPointsShape4 = _g.dataPointsShape4, dataPointsHeight5 = _g.dataPointsHeight5, dataPointsWidth5 = _g.dataPointsWidth5, dataPointsRadius5 = _g.dataPointsRadius5, dataPointsColor5 = _g.dataPointsColor5, dataPointsShape5 = _g.dataPointsShape5, getIsNthAreaChart = _g.getIsNthAreaChart, textFontSize1 = _g.textFontSize1, textFontSize2 = _g.textFontSize2, textFontSize3 = _g.textFontSize3, textFontSize4 = _g.textFontSize4, textFontSize5 = _g.textFontSize5, textColor1 = _g.textColor1, textColor2 = _g.textColor2, textColor3 = _g.textColor3, textColor4 = _g.textColor4, textColor5 = _g.textColor5, totalWidth = _g.totalWidth, maxValue = _g.maxValue, overflowTop = _g.overflowTop, extendedContainerHeight = _g.extendedContainerHeight, getX = _g.getX, getY = _g.getY, getSecondaryY = _g.getSecondaryY, secondaryMaxValue = _g.secondaryMaxValue, showValuesAsDataPointsText = _g.showValuesAsDataPointsText, thickness1 = _g.thickness1, thickness2 = _g.thickness2, thickness3 = _g.thickness3, thickness4 = _g.thickness4, thickness5 = _g.thickness5, zIndex1 = _g.zIndex1, zIndex2 = _g.zIndex2, zIndex3 = _g.zIndex3, zIndex4 = _g.zIndex4, zIndex5 = _g.zIndex5, strokeDashArray1 = _g.strokeDashArray1, strokeDashArray2 = _g.strokeDashArray2, strokeDashArray3 = _g.strokeDashArray3, strokeDashArray4 = _g.strokeDashArray4, strokeDashArray5 = _g.strokeDashArray5, rotateLabel = _g.rotateLabel, isAnimated = _g.isAnimated, hideDataPoints1 = _g.hideDataPoints1, hideDataPoints2 = _g.hideDataPoints2, hideDataPoints3 = _g.hideDataPoints3, hideDataPoints4 = _g.hideDataPoints4, hideDataPoints5 = _g.hideDataPoints5, color1 = _g.color1, color2 = _g.color2, color3 = _g.color3, color4 = _g.color4, color5 = _g.color5, startFillColor1 = _g.startFillColor1, endFillColor1 = _g.endFillColor1, startOpacity1 = _g.startOpacity1, endOpacity1 = _g.endOpacity1, startFillColor2 = _g.startFillColor2, endFillColor2 = _g.endFillColor2, startOpacity2 = _g.startOpacity2, endOpacity2 = _g.endOpacity2, startFillColor3 = _g.startFillColor3, endFillColor3 = _g.endFillColor3, startOpacity3 = _g.startOpacity3, endOpacity3 = _g.endOpacity3, startFillColor4 = _g.startFillColor4, endFillColor4 = _g.endFillColor4, startOpacity4 = _g.startOpacity4, endOpacity4 = _g.endOpacity4, startFillColor5 = _g.startFillColor5, endFillColor5 = _g.endFillColor5, startOpacity5 = _g.startOpacity5, endOpacity5 = _g.endOpacity5, arrowStrokeWidth1 = _g.arrowStrokeWidth1, arrowStrokeColor1 = _g.arrowStrokeColor1, arrowFillColor1 = _g.arrowFillColor1, arrowStrokeWidth2 = _g.arrowStrokeWidth2, arrowStrokeColor2 = _g.arrowStrokeColor2, arrowFillColor2 = _g.arrowFillColor2, arrowStrokeWidth3 = _g.arrowStrokeWidth3, arrowStrokeColor3 = _g.arrowStrokeColor3, arrowFillColor3 = _g.arrowFillColor3, arrowStrokeWidth4 = _g.arrowStrokeWidth4, arrowStrokeColor4 = _g.arrowStrokeColor4, arrowFillColor4 = _g.arrowFillColor4, arrowStrokeWidth5 = _g.arrowStrokeWidth5, arrowStrokeColor5 = _g.arrowStrokeColor5, arrowFillColor5 = _g.arrowFillColor5, arrowStrokeWidthsFromSet = _g.arrowStrokeWidthsFromSet, arrowStrokeColorsFromSet = _g.arrowStrokeColorsFromSet, arrowFillColorsFromSet = _g.arrowFillColorsFromSet, secondaryLineConfig = _g.secondaryLineConfig, gradientDirection = _g.gradientDirection, stepHeight = _g.stepHeight, noOfSectionsBelowXAxis = _g.noOfSectionsBelowXAxis, xAxisTextNumberOfLines = _g.xAxisTextNumberOfLines, xAxisLabelsVerticalShift = _g.xAxisLabelsVerticalShift, pointerConfig = _g.pointerConfig, pointerHeight = _g.pointerHeight, pointerWidth = _g.pointerWidth, pointerRadius = _g.pointerRadius, pointerColor = _g.pointerColor, pointerComponent = _g.pointerComponent, showPointerStrip = _g.showPointerStrip, pointerStripHeight = _g.pointerStripHeight, pointerStripWidth = _g.pointerStripWidth, pointerStripColor = _g.pointerStripColor, pointerStripUptoDataPoint = _g.pointerStripUptoDataPoint, pointerLabelComponent = _g.pointerLabelComponent, stripOverPointer = _g.stripOverPointer, shiftPointerLabelX = _g.shiftPointerLabelX, shiftPointerLabelY = _g.shiftPointerLabelY, pointerLabelWidth = _g.pointerLabelWidth, pointerLabelHeight = _g.pointerLabelHeight, autoAdjustPointerLabelPosition = _g.autoAdjustPointerLabelPosition, pointerVanishDelay = _g.pointerVanishDelay, activatePointersOnLongPress = _g.activatePointersOnLongPress, activatePointersDelay = _g.activatePointersDelay, persistPointer = _g.persistPointer, hidePointer1 = _g.hidePointer1, hidePointer2 = _g.hidePointer2, hidePointer3 = _g.hidePointer3, hidePointer4 = _g.hidePointer4, hidePointer5 = _g.hidePointer5, hideSecondaryPointer = _g.hideSecondaryPointer, pointerEvents = _g.pointerEvents, focusEnabled = _g.focusEnabled, showDataPointOnFocus = _g.showDataPointOnFocus, showStripOnFocus = _g.showStripOnFocus, showTextOnFocus = _g.showTextOnFocus, showDataPointLabelOnFocus = _g.showDataPointLabelOnFocus, stripHeight = _g.stripHeight, stripWidth = _g.stripWidth, stripColor = _g.stripColor, stripOpacity = _g.stripOpacity, stripStrokeDashArray = _g.stripStrokeDashArray, unFocusOnPressOut = _g.unFocusOnPressOut, delayBeforeUnFocus = _g.delayBeforeUnFocus, containerHeightIncludingBelowXAxis = _g.containerHeightIncludingBelowXAxis, lineGradient = _g.lineGradient, lineGradientDirection = _g.lineGradientDirection, lineGradientStartColor = _g.lineGradientStartColor, lineGradientEndColor = _g.lineGradientEndColor, barAndLineChartsWrapperProps = _g.barAndLineChartsWrapperProps;
66
+ var secondaryXAxis = props.secondaryXAxis;
67
+ var widthValuesFromSet = useMemo(function () { return dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) { return new Animated.Value(0); }); }, []);
68
+ useEffect(function () {
69
+ if (animateOnDataChange) {
70
+ Animated.parallel(animations.map(function (anItem, index) {
71
+ var _a, _b;
72
+ return Animated.timing(anItem, {
73
+ toValue: (_b = (_a = data[index]) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0,
74
+ useNativeDriver: Platform.OS === 'ios', // if useNativeDriver is set to true, animateOnDataChange feature fails for Android, so setting it true only for iOS
75
+ duration: onDataChangeAnimationDuration,
76
+ });
77
+ })).start();
78
+ }
79
+ }, [animateOnDataChange, data, onDataChangeAnimationDuration]);
80
+ var labelsAppear = useCallback(function () {
81
+ opacValue.setValue(0);
82
+ Animated.timing(opacValue, {
83
+ toValue: 1,
84
+ duration: 500,
85
+ easing: Easing.ease,
86
+ useNativeDriver: false,
87
+ }).start();
88
+ }, [opacValue]);
89
+ var appearingOpacity = opacValue.interpolate({
90
+ inputRange: [0, 1],
91
+ outputRange: [0, 1],
92
+ });
93
+ var decreaseWidth = useCallback(function () {
94
+ widthValue.setValue(0);
95
+ Animated.timing(widthValue, {
96
+ toValue: 1,
97
+ duration: animationDuration,
98
+ easing: Easing.linear,
99
+ useNativeDriver: false,
100
+ }).start();
101
+ }, [animationDuration, widthValue]);
102
+ var decreaseWidth2 = useCallback(function () {
103
+ widthValue2.setValue(0);
104
+ Animated.timing(widthValue2, {
105
+ toValue: 1,
106
+ duration: animationDuration,
107
+ easing: Easing.linear,
108
+ useNativeDriver: false,
109
+ }).start();
110
+ }, [animationDuration, widthValue2]);
111
+ var decreaseWidth3 = useCallback(function () {
112
+ widthValue3.setValue(0);
113
+ Animated.timing(widthValue3, {
114
+ toValue: 1,
115
+ duration: animationDuration,
116
+ easing: Easing.linear,
117
+ useNativeDriver: false,
118
+ }).start();
119
+ }, [animationDuration, widthValue3]);
120
+ var decreaseWidth4 = useCallback(function () {
121
+ widthValue4.setValue(0);
122
+ Animated.timing(widthValue4, {
123
+ toValue: 1,
124
+ duration: animationDuration,
125
+ easing: Easing.linear,
126
+ useNativeDriver: false,
127
+ }).start();
128
+ }, [animationDuration, widthValue4]);
129
+ var decreaseWidth5 = useCallback(function () {
130
+ widthValue5.setValue(0);
131
+ Animated.timing(widthValue5, {
132
+ toValue: 1,
133
+ duration: animationDuration,
134
+ easing: Easing.linear,
135
+ useNativeDriver: false,
136
+ }).start();
137
+ }, [animationDuration, widthValue5]);
138
+ var decreaseWidthsFromSet = useCallback(function () {
139
+ dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set, index) {
140
+ var _a;
141
+ (_a = widthValuesFromSet === null || widthValuesFromSet === void 0 ? void 0 : widthValuesFromSet[index]) === null || _a === void 0 ? void 0 : _a.setValue(0);
142
+ if (widthValuesFromSet === null || widthValuesFromSet === void 0 ? void 0 : widthValuesFromSet[index]) {
143
+ Animated.timing(widthValuesFromSet === null || widthValuesFromSet === void 0 ? void 0 : widthValuesFromSet[index], {
144
+ toValue: 1,
145
+ duration: animationDuration,
146
+ easing: Easing.linear,
147
+ useNativeDriver: false,
148
+ }).start();
149
+ }
150
+ });
151
+ }, [animationDuration, widthValuesFromSet]);
152
+ useEffect(function () {
153
+ decreaseWidth();
154
+ labelsAppear();
155
+ widthValuesFromSet === null || widthValuesFromSet === void 0 ? void 0 : widthValuesFromSet.forEach(function (item, index) {
156
+ setTimeout(function () {
157
+ decreaseWidthsFromSet();
158
+ }, animateTogether ? 0 : animationDuration * index);
159
+ });
160
+ setTimeout(function () {
161
+ decreaseWidth2();
162
+ }, animateTogether ? 0 : animationDuration);
163
+ setTimeout(function () {
164
+ decreaseWidth3();
165
+ }, animateTogether ? 0 : animationDuration * 2);
166
+ setTimeout(function () {
167
+ decreaseWidth4();
168
+ }, animateTogether ? 0 : animationDuration * 3);
169
+ setTimeout(function () {
170
+ decreaseWidth5();
171
+ }, animateTogether ? 0 : animationDuration * 4);
172
+ }, [
173
+ animateTogether,
174
+ animationDuration,
175
+ decreaseWidth,
176
+ decreaseWidth2,
177
+ decreaseWidth3,
178
+ decreaseWidth4,
179
+ decreaseWidth5,
180
+ labelsAppear,
181
+ ]);
182
+ var renderLabel = function (top, index, label, labelTextStyle, labelComponent) {
183
+ var _a, _b;
184
+ return (_jsx(View, { style: [
185
+ {
186
+ position: 'absolute',
187
+ bottom: top
188
+ ? containerHeight +
189
+ 60 +
190
+ ((_a = secondaryXAxis === null || secondaryXAxis === void 0 ? void 0 : secondaryXAxis.labelsDistanceFromXaxis) !== null && _a !== void 0 ? _a : 15)
191
+ : 54 - xAxisTextNumberOfLines * 18,
192
+ zIndex: 10,
193
+ width: spacing + labelsExtraHeight,
194
+ left: index === 0 && initialSpacing < 10
195
+ ? initialSpacing / 2 + spacing * index - spacing / 2 + 4
196
+ : initialSpacing / 2 + spacing * index - spacing / 2 - 10,
197
+ height: (_b = props.xAxisLabelsHeight) !== null && _b !== void 0 ? _b : xAxisTextNumberOfLines * 18,
198
+ },
199
+ rotateLabel && { transform: [{ rotate: '60deg' }] },
200
+ ], children: labelComponent ? (labelComponent()) : (_jsx(Text, { style: [{ textAlign: 'center' }, labelTextStyle], numberOfLines: xAxisTextNumberOfLines, children: label })) }));
201
+ };
202
+ var renderAnimatedLabel = function (top, index, label, labelTextStyle, labelComponent) {
203
+ var _a, _b;
204
+ return (_jsx(Animated.View, { style: [
205
+ {
206
+ height: rotateLabel
207
+ ? 40
208
+ : (_a = props.xAxisLabelsHeight) !== null && _a !== void 0 ? _a : xAxisTextNumberOfLines * 18,
209
+ position: 'absolute',
210
+ bottom: top
211
+ ? containerHeight +
212
+ 60 +
213
+ ((_b = secondaryXAxis === null || secondaryXAxis === void 0 ? void 0 : secondaryXAxis.labelsDistanceFromXaxis) !== null && _b !== void 0 ? _b : 15)
214
+ : rotateLabel
215
+ ? 10
216
+ : 54 - xAxisTextNumberOfLines * 18,
217
+ zIndex: 10,
218
+ width: spacing,
219
+ left: index === 0 && initialSpacing < 10
220
+ ? initialSpacing / 2 + spacing * index - spacing / 2 + 4
221
+ : initialSpacing / 2 + spacing * index - spacing / 2 - 10,
222
+ opacity: appearingOpacity,
223
+ },
224
+ rotateLabel && { transform: [{ rotate: '60deg' }] },
225
+ ], children: labelComponent ? (labelComponent()) : (_jsx(Text, { style: [{ textAlign: 'center' }, labelTextStyle], numberOfLines: xAxisTextNumberOfLines, children: label })) }));
226
+ };
227
+ var animatedWidth = widthValue.interpolate({
228
+ inputRange: [0, 1],
229
+ outputRange: [0, totalWidth],
230
+ });
231
+ var animatedWidth2 = widthValue2.interpolate({
232
+ inputRange: [0, 1],
233
+ outputRange: [0, totalWidth],
234
+ });
235
+ var animatedWidth3 = widthValue3.interpolate({
236
+ inputRange: [0, 1],
237
+ outputRange: [0, totalWidth],
238
+ });
239
+ var animatedWidth4 = widthValue4.interpolate({
240
+ inputRange: [0, 1],
241
+ outputRange: [0, totalWidth],
242
+ });
243
+ var animatedWidth5 = widthValue5.interpolate({
244
+ inputRange: [0, 1],
245
+ outputRange: [0, totalWidth],
246
+ });
247
+ var onStripPress = function (item, index) {
248
+ if (props.focusedDataPointIndex === undefined || !props.onFocus) {
249
+ setSelectedIndex(index);
250
+ }
251
+ if (props.onFocus) {
252
+ props.onFocus(item, index);
253
+ }
254
+ };
255
+ var renderDataPoints = function (hideDataPoints, dataForRender, originalDataFromProps, dataPtsShape, dataPtsWidth, dataPtsHeight, dataPtsColor, dataPtsRadius, textColor, textFontSize, startIndex, endIndex, isSecondary, showValuesAsDataPointsText) {
256
+ var getYOrSecondaryY = isSecondary ? getSecondaryY : getY;
257
+ return dataForRender.map(function (item, index) {
258
+ var _a;
259
+ var _b, _c, _d, _e, _f;
260
+ if (index < startIndex || index > endIndex)
261
+ return null;
262
+ if (item.hideDataPoint) {
263
+ return null;
264
+ }
265
+ var dataPointsShape, dataPointsWidth, dataPointsHeight, dataPointsColor, dataPointsRadius, text, customDataPoint, dataPointLabelComponent;
266
+ if (index === selectedIndex) {
267
+ dataPointsShape =
268
+ item.focusedDataPointShape ||
269
+ props.focusedDataPointShape ||
270
+ item.dataPointShape ||
271
+ dataPtsShape;
272
+ dataPointsWidth =
273
+ item.focusedDataPointWidth ||
274
+ props.focusedDataPointWidth ||
275
+ item.dataPointWidth ||
276
+ dataPtsWidth;
277
+ dataPointsHeight =
278
+ item.focusedDataPointHeight ||
279
+ props.focusedDataPointHeight ||
280
+ item.dataPointHeight ||
281
+ dataPtsHeight;
282
+ dataPointsColor =
283
+ item.focusedDataPointColor ||
284
+ props.focusedDataPointColor ||
285
+ LineDefaults.focusedDataPointColor;
286
+ dataPointsRadius =
287
+ item.focusedDataPointRadius ||
288
+ props.focusedDataPointRadius ||
289
+ item.dataPointRadius ||
290
+ dataPtsRadius;
291
+ if (showTextOnFocus) {
292
+ text = item.dataPointText;
293
+ }
294
+ customDataPoint =
295
+ item.focusedCustomDataPoint ||
296
+ props.focusedCustomDataPoint ||
297
+ item.customDataPoint ||
298
+ props.customDataPoint;
299
+ dataPointLabelComponent =
300
+ item.focusedDataPointLabelComponent || item.dataPointLabelComponent;
301
+ }
302
+ else {
303
+ dataPointsShape = item.dataPointShape || dataPtsShape;
304
+ dataPointsWidth = item.dataPointWidth || dataPtsWidth;
305
+ dataPointsHeight = item.dataPointHeight || dataPtsHeight;
306
+ dataPointsColor = item.dataPointColor || dataPtsColor;
307
+ dataPointsRadius = item.dataPointRadius || dataPtsRadius;
308
+ if (showTextOnFocus) {
309
+ text = '';
310
+ }
311
+ customDataPoint = item.customDataPoint || props.customDataPoint;
312
+ dataPointLabelComponent = item.dataPointLabelComponent;
313
+ }
314
+ if (showValuesAsDataPointsText) {
315
+ text = originalDataFromProps[index].value;
316
+ }
317
+ var currentStripHeight = (_b = item.stripHeight) !== null && _b !== void 0 ? _b : stripHeight;
318
+ var currentStripWidth = (_c = item.stripWidth) !== null && _c !== void 0 ? _c : stripWidth;
319
+ var currentStripOpacity = (_d = item.stripOpacity) !== null && _d !== void 0 ? _d : stripOpacity;
320
+ var currentStripStrokeDashArray = (_f = (_e = item.stripStrokeDashArray) !== null && _e !== void 0 ? _e : stripStrokeDashArray) !== null && _f !== void 0 ? _f : '';
321
+ var currentStripColor = item.stripColor || stripColor;
322
+ var position = I18nManager.isRTL ? 'right' : 'left';
323
+ var y1 = currentStripHeight
324
+ ? containerHeight - currentStripHeight + 8
325
+ : containerHeight -
326
+ dataPointsHeight / 2 +
327
+ 14 -
328
+ (item.value * containerHeight) / maxValue;
329
+ var actualStripHeight = currentStripHeight ||
330
+ (item.value * containerHeight) / maxValue - 2 + overflowTop;
331
+ return (_jsxs(Fragment, { children: [focusEnabled ? (_jsx(_Fragment, { children: unFocusOnPressOut ? ( // remove strip on onFocus
332
+ _jsx(Rect, { onPressIn: function () { return onStripPress(item, index); }, onPressOut: function () {
333
+ return setTimeout(function () { return setSelectedIndex(-1); }, delayBeforeUnFocus);
334
+ }, x: initialSpacing + (spacing * index - spacing / 2), y: 8, width: spacing, height: containerHeight - 0, fill: 'none' })) : (_jsx(Rect, { onPress: function () { return onStripPress(item, index); }, x: initialSpacing + (spacing * index - spacing / 2), y: 8, width: spacing, height: containerHeight, fill: 'none' })) })) : null, item.showStrip ||
335
+ (focusEnabled && index === selectedIndex && showStripOnFocus) ? (_jsx(Line, { x1: initialSpacing + spacing * index - currentStripWidth / 2 - 1, y1: y1, x2: initialSpacing + spacing * index - currentStripWidth / 2 - 1, y2: y1 + actualStripHeight, strokeWidth: currentStripWidth, stroke: currentStripColor, strokeDasharray: currentStripStrokeDashArray, opacity: currentStripOpacity })) : null, hideDataPoints ? null : (_jsxs(_Fragment, { children: [customDataPoint ? (_jsx(View, { style: [
336
+ styles.customDataPointContainer,
337
+ (_a = {
338
+ height: dataPointsHeight,
339
+ width: dataPointsWidth,
340
+ top: getYOrSecondaryY(item.value)
341
+ },
342
+ _a[position] = initialSpacing - dataPointsWidth + spacing * index,
343
+ _a.transform = [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
344
+ _a),
345
+ ], children: customDataPoint(item, index) })) : null, dataPointsShape === 'rectangular' ? (_jsx(Fragment, { children: customDataPoint ? null : (_jsx(Rect, { x: getX(index) - dataPointsWidth / 2, y: getYOrSecondaryY(item.value) - dataPointsHeight / 2, width: dataPointsWidth, height: dataPointsHeight, fill: showDataPointOnFocus
346
+ ? index === selectedIndex
347
+ ? dataPointsColor
348
+ : 'none'
349
+ : dataPointsColor, onPress: function () {
350
+ item.onPress
351
+ ? item.onPress(item, index)
352
+ : props.onPress
353
+ ? props.onPress(item, index)
354
+ : null;
355
+ } })) }, index)) : (_jsx(Fragment, { children: customDataPoint ? null : (_jsx(Circle, { cx: getX(index), cy: getYOrSecondaryY(item.value), r: dataPointsRadius, fill: showDataPointOnFocus
356
+ ? index === selectedIndex
357
+ ? dataPointsColor
358
+ : 'none'
359
+ : dataPointsColor, onPress: function () {
360
+ item.onPress
361
+ ? item.onPress(item, index)
362
+ : props.onPress
363
+ ? props.onPress(item, index)
364
+ : null;
365
+ } })) }, index)), dataPointLabelComponent ? (!showTextOnFocus || index === selectedIndex ? (_jsx(View, { style: [
366
+ styles.customDataPointContainer,
367
+ {
368
+ zIndex: index === selectedIndex ? 1000 : 0,
369
+ top: containerHeight +
370
+ (item.dataPointLabelShiftY ||
371
+ props.dataPointLabelShiftY ||
372
+ 0) -
373
+ (item.value * containerHeight) / maxValue,
374
+ left: initialSpacing +
375
+ (item.dataPointLabelShiftX ||
376
+ props.dataPointLabelShiftX ||
377
+ 0) -
378
+ (item.dataPointLabelWidth
379
+ ? item.dataPointLabelWidth + 20
380
+ : props.dataPointLabelWidth
381
+ ? props.dataPointLabelWidth + 20
382
+ : 50) /
383
+ 2 +
384
+ spacing * index,
385
+ },
386
+ ], children: showDataPointLabelOnFocus
387
+ ? index === selectedIndex
388
+ ? dataPointLabelComponent()
389
+ : null
390
+ : dataPointLabelComponent() })) : null) : text || item.dataPointText ? (!showTextOnFocus || index === selectedIndex ? (_jsx(CanvasText, { fill: item.textColor || textColor, fontSize: item.textFontSize || textFontSize, x: getX(index) -
391
+ dataPointsWidth +
392
+ (item.textShiftX || props.textShiftX || 0), y: getYOrSecondaryY(item.value) -
393
+ dataPointsHeight / 2 +
394
+ (item.textShiftY || props.textShiftY || 0), children: !showTextOnFocus && !showValuesAsDataPointsText
395
+ ? item.dataPointText
396
+ : text })) : null) : null] }))] }, index));
397
+ });
398
+ };
399
+ var renderSpecificVerticalLines = function (dataForRender) {
400
+ return dataForRender.map(function (item, index) {
401
+ var _a, _b, _c;
402
+ if (item.showVerticalLine) {
403
+ var x = getX(index);
404
+ return (_jsx(Line, { x1: x, y1: extendedContainerHeight, x2: x, y2: ((_a = item.verticalLineUptoDataPoint) !== null && _a !== void 0 ? _a : props.verticalLinesUptoDataPoint)
405
+ ? getY(item.value)
406
+ : -xAxisThickness, stroke: item.verticalLineColor || props.verticalLinesColor || 'lightgray', strokeWidth: item.verticalLineThickness || props.verticalLinesThickness || 2, strokeDasharray: (_c = (_b = item.verticalLineStrokeDashArray) !== null && _b !== void 0 ? _b : props.verticalLinesStrokeDashArray) !== null && _c !== void 0 ? _c : '' }, index));
407
+ }
408
+ return null;
409
+ });
410
+ };
411
+ var renderPointer = function (lineNumber, isDataSet) {
412
+ if (isDataSet) {
413
+ var pointerItemLocal_1, pointerYLocal_1, pointerColorLocal_1;
414
+ return dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set, index) {
415
+ var _a, _b;
416
+ var pIndex = barAndLineChartsWrapperProps.pointerIndex;
417
+ pointerItemLocal_1 = set.data[pIndex];
418
+ pointerYLocal_1 = pointerYsForDataSet[index];
419
+ pointerColorLocal_1 =
420
+ (_b = (_a = pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointerColorsForDataSet) === null || _a === void 0 ? void 0 : _a[index]) !== null && _b !== void 0 ? _b : pointerColor;
421
+ return (_jsx(Fragment, { children: Pointer({
422
+ pointerX: pointerX,
423
+ pointerYLocal: pointerYLocal_1 + xAxisThickness,
424
+ pointerComponent: pointerComponent,
425
+ pointerHeight: pointerHeight,
426
+ pointerRadius: pointerRadius,
427
+ pointerWidth: pointerWidth,
428
+ pointerItemLocal: pointerItemLocal_1,
429
+ pointerColorLocal: pointerColorLocal_1,
430
+ }) }, 'dSetPts' + index));
431
+ });
432
+ }
433
+ if (lineNumber === 1 && hidePointer1)
434
+ return;
435
+ if (lineNumber === 2 && hidePointer2)
436
+ return;
437
+ if (lineNumber === 3 && hidePointer3)
438
+ return;
439
+ if (lineNumber === 4 && hidePointer4)
440
+ return;
441
+ if (lineNumber === 5 && hidePointer5)
442
+ return;
443
+ // 6 is for secondaryData
444
+ if (lineNumber === 6 && hideSecondaryPointer)
445
+ return;
446
+ var pointerItemLocal, pointerYLocal, pointerColorLocal;
447
+ switch (lineNumber) {
448
+ case 1:
449
+ pointerItemLocal = pointerItem;
450
+ pointerYLocal = pointerY;
451
+ pointerColorLocal = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointer1Color) || pointerColor;
452
+ break;
453
+ case 2:
454
+ pointerItemLocal = pointerItem2;
455
+ pointerYLocal = pointerY2;
456
+ pointerColorLocal = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointer2Color) || pointerColor;
457
+ break;
458
+ case 3:
459
+ pointerItemLocal = pointerItem3;
460
+ pointerYLocal = pointerY3;
461
+ pointerColorLocal = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointer3Color) || pointerColor;
462
+ break;
463
+ case 4:
464
+ pointerItemLocal = pointerItem4;
465
+ pointerYLocal = pointerY4;
466
+ pointerColorLocal = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointer4Color) || pointerColor;
467
+ break;
468
+ case 5:
469
+ pointerItemLocal = pointerItem5;
470
+ pointerYLocal = pointerY5;
471
+ pointerColorLocal = (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.pointer5Color) || pointerColor;
472
+ break;
473
+ case 6:
474
+ pointerItemLocal = secondaryPointerItem;
475
+ pointerYLocal = secondaryPointerY;
476
+ pointerColorLocal =
477
+ (pointerConfig === null || pointerConfig === void 0 ? void 0 : pointerConfig.secondaryPointerColor) || pointerColor;
478
+ break;
479
+ }
480
+ if (!pointerYLocal)
481
+ return;
482
+ return Pointer({
483
+ pointerX: pointerX,
484
+ pointerYLocal: pointerYLocal + xAxisThickness,
485
+ pointerComponent: pointerComponent,
486
+ pointerHeight: pointerHeight,
487
+ pointerRadius: pointerRadius,
488
+ pointerWidth: pointerWidth,
489
+ pointerItemLocal: pointerItemLocal,
490
+ pointerColorLocal: pointerColorLocal,
491
+ });
492
+ };
493
+ var renderStripAndLabel = function () {
494
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
495
+ var pointerItemLocal, pointerYLocal;
496
+ pointerItemLocal = [
497
+ __assign(__assign({}, pointerItem), { value: (_b = (_a = props.data) === null || _a === void 0 ? void 0 : _a[pointerIndex]) === null || _b === void 0 ? void 0 : _b.value }),
498
+ ];
499
+ var arr = [pointerY];
500
+ if (pointerY2 !== 0) {
501
+ arr.push(pointerY2);
502
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_d = (_c = props.data2) === null || _c === void 0 ? void 0 : _c[pointerIndex]) === null || _d === void 0 ? void 0 : _d.value }));
503
+ }
504
+ if (pointerY3 !== 0) {
505
+ arr.push(pointerY3);
506
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_f = (_e = props.data3) === null || _e === void 0 ? void 0 : _e[pointerIndex]) === null || _f === void 0 ? void 0 : _f.value }));
507
+ }
508
+ if (pointerY4 !== 0) {
509
+ arr.push(pointerY4);
510
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_h = (_g = props.data4) === null || _g === void 0 ? void 0 : _g[pointerIndex]) === null || _h === void 0 ? void 0 : _h.value }));
511
+ }
512
+ if (pointerY5 !== 0) {
513
+ arr.push(pointerY5);
514
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_k = (_j = props.data5) === null || _j === void 0 ? void 0 : _j[pointerIndex]) === null || _k === void 0 ? void 0 : _k.value }));
515
+ }
516
+ if (secondaryPointerY !== 0) {
517
+ pointerItemLocal.push(__assign(__assign({}, pointerItem), { value: (_m = (_l = props.secondaryData) === null || _l === void 0 ? void 0 : _l[pointerIndex]) === null || _m === void 0 ? void 0 : _m.value }));
518
+ }
519
+ pointerYLocal = Math.min.apply(Math, __spreadArray([], __read(arr), false));
520
+ return StripAndLabel({
521
+ autoAdjustPointerLabelPosition: autoAdjustPointerLabelPosition,
522
+ pointerX: pointerX,
523
+ pointerLabelWidth: pointerLabelWidth,
524
+ activatePointersOnLongPress: activatePointersOnLongPress,
525
+ yAxisLabelWidth: yAxisLabelWidth,
526
+ pointerRadius: pointerRadius,
527
+ pointerWidth: pointerWidth,
528
+ shiftPointerLabelX: shiftPointerLabelX,
529
+ pointerLabelHeight: pointerLabelHeight,
530
+ pointerYLocal: pointerYLocal,
531
+ pointerStripUptoDataPoint: pointerStripUptoDataPoint,
532
+ pointerStripHeight: pointerStripHeight,
533
+ shiftPointerLabelY: shiftPointerLabelY,
534
+ pointerItemLocal: pointerItemLocal,
535
+ showPointerStrip: showPointerStrip,
536
+ pointerStripWidth: pointerStripWidth,
537
+ containerHeight: containerHeight,
538
+ xAxisThickness: xAxisThickness,
539
+ pointerStripColor: pointerStripColor,
540
+ pointerConfig: pointerConfig,
541
+ pointerLabelComponent: pointerLabelComponent,
542
+ secondaryPointerItem: secondaryPointerItem,
543
+ scrollX: scrollX,
544
+ pointerEvents: pointerEvents,
545
+ });
546
+ };
547
+ var getLineGradientComponent = function () {
548
+ return props.lineGradientComponent ? (props.lineGradientComponent()) : (_jsxs(LinearGradient, { id: "lineGradient", x1: "0", y1: "0", x2: lineGradientDirection === 'horizontal' ? '1' : '0', y2: lineGradientDirection === 'vertical' ? '1' : '0', children: [_jsx(Stop, { offset: "0", stopColor: lineGradientStartColor }), _jsx(Stop, { offset: "1", stopColor: lineGradientEndColor })] }));
549
+ };
550
+ var getAreaGradientComponent = function (startFillColor, endFillColor, startOpacity, endOpacity) {
551
+ return props.areaGradientComponent ? (props.areaGradientComponent()) : (_jsxs(LinearGradient, { id: "Gradient", x1: "0", y1: "0", x2: gradientDirection === 'horizontal' ? '1' : '0', y2: gradientDirection === 'vertical' ? '1' : '0', children: [_jsx(Stop, { offset: "0", stopColor: startFillColor, stopOpacity: startOpacity.toString() }), _jsx(Stop, { offset: "1", stopColor: endFillColor, stopOpacity: endOpacity.toString() })] }));
552
+ };
553
+ var lineSvgComponent = function (points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key) {
554
+ var _a, _b;
555
+ if (!points)
556
+ return null;
557
+ var isCurved = points.includes('C');
558
+ var isNthAreaChart = getIsNthAreaChart(key !== null && key !== void 0 ? key : 0);
559
+ var ar = [{ d: '', color: '', strokeWidth: 0 }];
560
+ if (points.includes(RANGE_ENTER)) {
561
+ ar = getRegionPathObjects(points, color, currentLineThickness !== null && currentLineThickness !== void 0 ? currentLineThickness : 0, thickness, strokeDashArray !== null && strokeDashArray !== void 0 ? strokeDashArray : [], isCurved, RANGE_ENTER, STOP, RANGE_EXIT);
562
+ }
563
+ else if (points.includes(SEGMENT_START)) {
564
+ ar = getSegmentedPathObjects(points, color, currentLineThickness !== null && currentLineThickness !== void 0 ? currentLineThickness : 0, thickness, strokeDashArray !== null && strokeDashArray !== void 0 ? strokeDashArray : [], isCurved, SEGMENT_START, SEGMENT_END);
565
+ }
566
+ var lineSvgPropsOuter = {
567
+ d: points,
568
+ fill: 'none',
569
+ stroke: lineGradient
570
+ ? props.lineGradientId
571
+ ? "url(#".concat(props.lineGradientId, ")")
572
+ : "url(#lineGradient)"
573
+ : color,
574
+ strokeWidth: currentLineThickness || thickness,
575
+ };
576
+ if (strokeDashArray &&
577
+ strokeDashArray.length === 2 &&
578
+ typeof strokeDashArray[0] === 'number' &&
579
+ typeof strokeDashArray[1] === 'number') {
580
+ lineSvgPropsOuter.strokeDasharray = strokeDashArray;
581
+ }
582
+ return (_jsxs(Svg, { onPress: props.onBackgroundPress, children: [lineGradient && getLineGradientComponent(), points.includes(SEGMENT_START) || points.includes(RANGE_ENTER) ? (ar.map(function (item, index) {
583
+ var lineSvgProps = {
584
+ d: item.d,
585
+ fill: 'none',
586
+ stroke: lineGradient
587
+ ? props.lineGradientId
588
+ ? "url(#".concat(props.lineGradientId, ")")
589
+ : "url(#lineGradient)"
590
+ : item.color,
591
+ strokeWidth: item.strokeWidth,
592
+ };
593
+ if (item.strokeDashArray &&
594
+ item.strokeDashArray.length === 2 &&
595
+ typeof item.strokeDashArray[0] === 'number' &&
596
+ typeof item.strokeDashArray[1] === 'number') {
597
+ lineSvgProps.strokeDasharray = item.strokeDashArray;
598
+ }
599
+ return _jsx(Path, __assign({}, lineSvgProps), index);
600
+ })) : (_jsx(Path, __assign({}, lineSvgPropsOuter))), isNthAreaChart &&
601
+ getAreaGradientComponent(startFillColor, endFillColor, startOpacity, endOpacity), isNthAreaChart && (_jsx(Path, { onPress: props.onChartAreaPress, d: fillPoints, fill: props.areaGradientId
602
+ ? "url(#".concat(props.areaGradientId, ")")
603
+ : "url(#Gradient)", stroke: 'transparent', strokeWidth: currentLineThickness || thickness })), renderSpecificVerticalLines(data), renderSpecificVerticalLines(data2), renderSpecificVerticalLines(data3), renderSpecificVerticalLines(data4), renderSpecificVerticalLines(data5), (_a = dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) { return renderSpecificVerticalLines(set === null || set === void 0 ? void 0 : set.data); })) !== null && _a !== void 0 ? _a : null, (_b = dataSet === null || dataSet === void 0 ? void 0 : dataSet.map(function (set) {
604
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
605
+ return renderDataPoints((_a = set.hideDataPoints) !== null && _a !== void 0 ? _a : hideDataPoints1, set.data, adjustToOffset(set.data, -((_b = props.yAxisOffset) !== null && _b !== void 0 ? _b : 0)), // need the actual values passed by user
606
+ (_c = set.dataPointsShape) !== null && _c !== void 0 ? _c : dataPointsShape1, (_d = set.dataPointsWidth) !== null && _d !== void 0 ? _d : dataPointsWidth1, (_e = set.dataPointsHeight) !== null && _e !== void 0 ? _e : dataPointsHeight1, (_f = set.dataPointsColor) !== null && _f !== void 0 ? _f : dataPointsColor1, (_g = set.dataPointsRadius) !== null && _g !== void 0 ? _g : dataPointsRadius1, (_h = set.textColor) !== null && _h !== void 0 ? _h : textColor1, (_j = set.textFontSize) !== null && _j !== void 0 ? _j : textFontSize1, (_k = set.startIndex) !== null && _k !== void 0 ? _k : 0, (_l = set.endIndex) !== null && _l !== void 0 ? _l : set.data.length - 1, set.isSecondary, showValuesAsDataPointsText);
607
+ })) !== null && _b !== void 0 ? _b : null, renderDataPoints(hideDataPoints1, data, props.data, dataPointsShape1, dataPointsWidth1, dataPointsHeight1, dataPointsColor1, dataPointsRadius1, textColor1, textFontSize1, startIndex1, endIndex1, false, showValuesAsDataPointsText), renderDataPoints(hideDataPoints2, data2, props.data2, dataPointsShape2, dataPointsWidth2, dataPointsHeight2, dataPointsColor2, dataPointsRadius2, textColor2, textFontSize2, startIndex2, endIndex2, false, showValuesAsDataPointsText), renderDataPoints(hideDataPoints3, data3, props.data3, dataPointsShape3, dataPointsWidth3, dataPointsHeight3, dataPointsColor3, dataPointsRadius3, textColor3, textFontSize3, startIndex3, endIndex3, false, showValuesAsDataPointsText), renderDataPoints(hideDataPoints4, data4, props.data4, dataPointsShape4, dataPointsWidth4, dataPointsHeight4, dataPointsColor4, dataPointsRadius4, textColor4, textFontSize4, startIndex4, endIndex4, false, showValuesAsDataPointsText), renderDataPoints(hideDataPoints5, data5, props.data5, dataPointsShape5, dataPointsWidth5, dataPointsHeight5, dataPointsColor5, dataPointsRadius5, textColor5, textFontSize5, startIndex5, endIndex5, false, showValuesAsDataPointsText), (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length)
608
+ ? renderDataPoints(secondaryLineConfig.hideDataPoints, secondaryData, props.secondaryData, secondaryLineConfig.dataPointsShape, secondaryLineConfig.dataPointsWidth, secondaryLineConfig.dataPointsHeight, secondaryLineConfig.dataPointsColor, secondaryLineConfig.dataPointsRadius, secondaryLineConfig.textColor, secondaryLineConfig.textFontSize, secondaryLineConfig.startIndex, secondaryLineConfig.endIndex, true, secondaryLineConfig.showValuesAsDataPointsText)
609
+ : null, showArrow && (_jsx(Path, { d: arrowPoints, fill: arrowFillColor, stroke: arrowStrokeColor, strokeWidth: arrowStrokeWidth }))] }));
610
+ };
611
+ var activatePointers = function (x) {
612
+ var factor = (x - initialSpacing) / spacing;
613
+ factor = Math.round(factor);
614
+ factor = Math.min(factor, (data0 !== null && data0 !== void 0 ? data0 : data).length - 1);
615
+ factor = Math.max(factor, 0);
616
+ var z = initialSpacing +
617
+ spacing * factor -
618
+ (pointerRadius || pointerWidth / 2) -
619
+ 1;
620
+ setPointerX(z);
621
+ setPointerIndex(factor);
622
+ var item, y;
623
+ item = (data0 !== null && data0 !== void 0 ? data0 : data)[factor];
624
+ y =
625
+ containerHeight -
626
+ (item.value * containerHeight) / maxValue -
627
+ (pointerRadius || pointerHeight / 2) +
628
+ 10;
629
+ setPointerY(y);
630
+ setPointerItem(item);
631
+ if (data2 && data2.length) {
632
+ item = data2[factor];
633
+ if (item) {
634
+ y =
635
+ containerHeight -
636
+ (item.value * containerHeight) / maxValue -
637
+ (pointerRadius || pointerHeight / 2) +
638
+ 10;
639
+ setPointerY2(y);
640
+ setPointerItem2(item);
641
+ }
642
+ }
643
+ if (data3 && data3.length) {
644
+ item = data3[factor];
645
+ if (item) {
646
+ y =
647
+ containerHeight -
648
+ (item.value * containerHeight) / maxValue -
649
+ (pointerRadius || pointerHeight / 2) +
650
+ 10;
651
+ setPointerY3(y);
652
+ setPointerItem3(item);
653
+ }
654
+ }
655
+ if (data4 && data4.length) {
656
+ item = data4[factor];
657
+ if (item) {
658
+ y =
659
+ containerHeight -
660
+ (item.value * containerHeight) / maxValue -
661
+ (pointerRadius || pointerHeight / 2) +
662
+ 10;
663
+ setPointerY4(y);
664
+ setPointerItem4(item);
665
+ }
666
+ }
667
+ if (data5 && data5.length) {
668
+ item = data5[factor];
669
+ if (item) {
670
+ y =
671
+ containerHeight -
672
+ (item.value * containerHeight) / maxValue -
673
+ (pointerRadius || pointerHeight / 2) +
674
+ 10;
675
+ setPointerY5(y);
676
+ setPointerItem5(item);
677
+ }
678
+ }
679
+ if (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length) {
680
+ item = secondaryData[factor];
681
+ if (item) {
682
+ y =
683
+ containerHeight -
684
+ (item.value * containerHeight) / secondaryMaxValue -
685
+ (pointerRadius || pointerHeight / 2) +
686
+ 10;
687
+ setSecondaryPointerY(y);
688
+ // @ts-ignore
689
+ setSecondaryPointerItem(item);
690
+ }
691
+ }
692
+ if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
693
+ if (dataSet[0].data[factor]) {
694
+ var ysForDataSet = dataSet.map(function (set) {
695
+ var item = set.data[factor];
696
+ var y = item
697
+ ? containerHeight -
698
+ (item.value * containerHeight) / maxValue -
699
+ (pointerRadius || pointerHeight / 2) +
700
+ 10
701
+ : 0;
702
+ return y;
703
+ });
704
+ setPointerYsForDataSet(ysForDataSet);
705
+ }
706
+ }
707
+ };
708
+ var renderLine = function (zIndex, points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key) {
709
+ var _a, _b;
710
+ return (_jsx(View, { onMoveShouldSetResponder: function (evt) { return (pointerConfig ? true : false); }, onResponderGrant: function (evt) {
711
+ if (!pointerConfig)
712
+ return;
713
+ setResponderStartTime(evt.timeStamp);
714
+ if (activatePointersOnLongPress) {
715
+ return;
716
+ }
717
+ var x = evt.nativeEvent.locationX;
718
+ activatePointers(x);
719
+ }, onResponderMove: function (evt) {
720
+ if (!pointerConfig)
721
+ return;
722
+ if (activatePointersOnLongPress &&
723
+ evt.timeStamp - responderStartTime < activatePointersDelay) {
724
+ return;
725
+ }
726
+ else {
727
+ setResponderActive(true);
728
+ }
729
+ var x = evt.nativeEvent.locationX;
730
+ if (!activatePointersOnLongPress &&
731
+ x > (props.width || Dimensions.get('window').width))
732
+ return;
733
+ var factor = (x - initialSpacing) / spacing;
734
+ factor = Math.round(factor);
735
+ factor = Math.min(factor, (data0 !== null && data0 !== void 0 ? data0 : data).length - 1);
736
+ factor = Math.max(factor, 0);
737
+ var z = initialSpacing +
738
+ spacing * factor -
739
+ (pointerRadius || pointerWidth / 2) -
740
+ 1;
741
+ var item, y;
742
+ setPointerX(z);
743
+ setPointerIndex(factor);
744
+ item = (data0 !== null && data0 !== void 0 ? data0 : data)[factor];
745
+ y =
746
+ containerHeight -
747
+ (item.value * containerHeight) / maxValue -
748
+ (pointerRadius || pointerHeight / 2) +
749
+ 10;
750
+ setPointerY(y);
751
+ setPointerItem(item);
752
+ if (data2 && data2.length) {
753
+ item = data2[factor];
754
+ if (item) {
755
+ y =
756
+ containerHeight -
757
+ (item.value * containerHeight) / maxValue -
758
+ (pointerRadius || pointerHeight / 2) +
759
+ 10;
760
+ setPointerY2(y);
761
+ setPointerItem2(item);
762
+ }
763
+ }
764
+ if (data3 && data3.length) {
765
+ item = data3[factor];
766
+ if (item) {
767
+ y =
768
+ containerHeight -
769
+ (item.value * containerHeight) / maxValue -
770
+ (pointerRadius || pointerHeight / 2) +
771
+ 10;
772
+ setPointerY3(y);
773
+ setPointerItem3(item);
774
+ }
775
+ }
776
+ if (data4 && data4.length) {
777
+ item = data4[factor];
778
+ if (item) {
779
+ y =
780
+ containerHeight -
781
+ (item.value * containerHeight) / maxValue -
782
+ (pointerRadius || pointerHeight / 2) +
783
+ 10;
784
+ setPointerY4(y);
785
+ setPointerItem4(item);
786
+ }
787
+ }
788
+ if (data5 && data5.length) {
789
+ item = data5[factor];
790
+ if (item) {
791
+ y =
792
+ containerHeight -
793
+ (item.value * containerHeight) / maxValue -
794
+ (pointerRadius || pointerHeight / 2) +
795
+ 10;
796
+ setPointerY5(y);
797
+ setPointerItem5(item);
798
+ }
799
+ }
800
+ if (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length) {
801
+ item = secondaryData[factor];
802
+ if (item) {
803
+ y =
804
+ containerHeight -
805
+ (item.value * containerHeight) / secondaryMaxValue -
806
+ (pointerRadius || pointerHeight / 2) +
807
+ 10;
808
+ setSecondaryPointerY(y);
809
+ // @ts-ignore
810
+ setSecondaryPointerItem(item);
811
+ }
812
+ }
813
+ if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
814
+ var ysForDataSet = dataSet.map(function (set) {
815
+ var item = set.data[factor];
816
+ var y = item
817
+ ? containerHeight -
818
+ (item.value * containerHeight) / maxValue -
819
+ (pointerRadius || pointerHeight / 2) +
820
+ 10
821
+ : 0;
822
+ return y;
823
+ });
824
+ setPointerYsForDataSet(ysForDataSet);
825
+ }
826
+ },
827
+ // onResponderReject={evt => {
828
+ // console.log('evt...reject.......',evt);
829
+ // }}
830
+ onResponderEnd: function (evt) {
831
+ // console.log('evt...end.......',evt);
832
+ setResponderStartTime(0);
833
+ setPointerIndex(-1);
834
+ setResponderActive(false);
835
+ if (!persistPointer)
836
+ setTimeout(function () { return setPointerX(0); }, pointerVanishDelay);
837
+ }, onResponderTerminationRequest: function (evt) { return false; },
838
+ // onResponderTerminate={evt => {
839
+ // console.log('evt...terminate.......',evt);
840
+ // }}
841
+ // onResponderRelease={evt => {
842
+ // setResponderStartTime(0);
843
+ // setResponderActive(false);
844
+ // setTimeout(() => setPointerX(0), pointerVanishDelay);
845
+ // }}
846
+ style: {
847
+ position: 'absolute',
848
+ height: containerHeightIncludingBelowXAxis +
849
+ ((_a = props.overflowBottom) !== null && _a !== void 0 ? _a : dataPointsRadius1),
850
+ bottom: 60 +
851
+ xAxisLabelsVerticalShift +
852
+ labelsExtraHeight -
853
+ xAxisThickness -
854
+ ((_b = props.overflowBottom) !== null && _b !== void 0 ? _b : dataPointsRadius1),
855
+ zIndex: zIndex,
856
+ transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
857
+ width: totalWidth,
858
+ }, children: lineSvgComponent(points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key) }, key !== null && key !== void 0 ? key : 0));
859
+ };
860
+ var renderAnimatedLine = function (zIndex, points, animatedWidth, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key) {
861
+ var _a, _b;
862
+ return (_jsx(Animated.View, { onStartShouldSetResponder: function (evt) { return (pointerConfig ? true : false); }, onMoveShouldSetResponder: function (evt) { return (pointerConfig ? true : false); }, onResponderGrant: function (evt) {
863
+ if (!pointerConfig)
864
+ return;
865
+ setResponderStartTime(evt.timeStamp);
866
+ if (activatePointersOnLongPress) {
867
+ return;
868
+ }
869
+ var x = evt.nativeEvent.locationX;
870
+ activatePointers(x);
871
+ }, onResponderMove: function (evt) {
872
+ if (!pointerConfig)
873
+ return;
874
+ if (activatePointersOnLongPress &&
875
+ evt.timeStamp - responderStartTime < activatePointersDelay) {
876
+ return;
877
+ }
878
+ else {
879
+ setResponderActive(true);
880
+ }
881
+ var x = evt.nativeEvent.locationX;
882
+ if (!activatePointersOnLongPress &&
883
+ x > (props.width || Dimensions.get('window').width))
884
+ return;
885
+ var factor = (x - initialSpacing) / spacing;
886
+ factor = Math.round(factor);
887
+ factor = Math.min(factor, (data0 !== null && data0 !== void 0 ? data0 : data).length - 1);
888
+ factor = Math.max(factor, 0);
889
+ var z = initialSpacing +
890
+ spacing * factor -
891
+ (pointerRadius || pointerWidth / 2) -
892
+ 1;
893
+ var item, y;
894
+ setPointerX(z);
895
+ setPointerIndex(factor);
896
+ item = (data0 !== null && data0 !== void 0 ? data0 : data)[factor];
897
+ y =
898
+ containerHeight -
899
+ (item.value * containerHeight) / maxValue -
900
+ (pointerRadius || pointerHeight / 2) +
901
+ 10;
902
+ setPointerY(y);
903
+ setPointerItem(item);
904
+ if (data2 && data2.length) {
905
+ item = data2[factor];
906
+ if (item) {
907
+ y =
908
+ containerHeight -
909
+ (item.value * containerHeight) / maxValue -
910
+ (pointerRadius || pointerHeight / 2) +
911
+ 10;
912
+ setPointerY2(y);
913
+ setPointerItem2(item);
914
+ }
915
+ }
916
+ if (data3 && data3.length) {
917
+ item = data3[factor];
918
+ if (item) {
919
+ y =
920
+ containerHeight -
921
+ (item.value * containerHeight) / maxValue -
922
+ (pointerRadius || pointerHeight / 2) +
923
+ 10;
924
+ setPointerY3(y);
925
+ setPointerItem3(item);
926
+ }
927
+ }
928
+ if (data4 && data4.length) {
929
+ item = data4[factor];
930
+ if (item) {
931
+ y =
932
+ containerHeight -
933
+ (item.value * containerHeight) / maxValue -
934
+ (pointerRadius || pointerHeight / 2) +
935
+ 10;
936
+ setPointerY4(y);
937
+ setPointerItem4(item);
938
+ }
939
+ }
940
+ if (data5 && data5.length) {
941
+ item = data5[factor];
942
+ if (item) {
943
+ y =
944
+ containerHeight -
945
+ (item.value * containerHeight) / maxValue -
946
+ (pointerRadius || pointerHeight / 2) +
947
+ 10;
948
+ setPointerY5(y);
949
+ setPointerItem5(item);
950
+ }
951
+ }
952
+ if (secondaryData === null || secondaryData === void 0 ? void 0 : secondaryData.length) {
953
+ item = secondaryData[factor];
954
+ if (item) {
955
+ y =
956
+ containerHeight -
957
+ (item.value * containerHeight) / secondaryMaxValue -
958
+ (pointerRadius || pointerHeight / 2) +
959
+ 10;
960
+ setSecondaryPointerY(y);
961
+ // @ts-ignore
962
+ setSecondaryPointerItem(item);
963
+ }
964
+ }
965
+ if (dataSet === null || dataSet === void 0 ? void 0 : dataSet.length) {
966
+ if (dataSet[0].data[factor]) {
967
+ var ysForDataSet = dataSet.map(function (set) {
968
+ var item = set.data[factor];
969
+ var y = item
970
+ ? containerHeight -
971
+ (item.value * containerHeight) / maxValue -
972
+ (pointerRadius || pointerHeight / 2) +
973
+ 10
974
+ : 0;
975
+ return y;
976
+ });
977
+ setPointerYsForDataSet(ysForDataSet);
978
+ }
979
+ }
980
+ },
981
+ // onResponderReject={evt => {
982
+ // console.log('evt...reject.......',evt);
983
+ // }}
984
+ onResponderEnd: function (evt) {
985
+ // console.log('evt...end.......',evt);
986
+ setResponderStartTime(0);
987
+ setPointerIndex(-1);
988
+ setResponderActive(false);
989
+ if (!persistPointer)
990
+ setTimeout(function () { return setPointerX(0); }, pointerVanishDelay);
991
+ }, onResponderTerminationRequest: function (evt) { return false; },
992
+ // onResponderTerminate={evt => {
993
+ // console.log('evt...terminate.......',evt);
994
+ // }}
995
+ // onResponderRelease={evt => {
996
+ // setResponderStartTime(0);
997
+ // setResponderActive(false);
998
+ // setTimeout(() => setPointerX(0), pointerVanishDelay);
999
+ // }}
1000
+ style: {
1001
+ position: 'absolute',
1002
+ height: containerHeightIncludingBelowXAxis +
1003
+ ((_a = props.overflowBottom) !== null && _a !== void 0 ? _a : dataPointsRadius1),
1004
+ bottom: 60 +
1005
+ xAxisLabelsVerticalShift +
1006
+ labelsExtraHeight -
1007
+ xAxisThickness -
1008
+ ((_b = props.overflowBottom) !== null && _b !== void 0 ? _b : dataPointsRadius1),
1009
+ zIndex: zIndex,
1010
+ transform: [{ scaleX: I18nManager.isRTL ? -1 : 1 }],
1011
+ width: animatedWidth,
1012
+ }, children: lineSvgComponent(points, currentLineThickness, color, fillPoints, startFillColor, endFillColor, startOpacity, endOpacity, strokeDashArray, showArrow, arrowPoints, arrowStrokeWidth, arrowStrokeColor, arrowFillColor, key) }, key !== null && key !== void 0 ? key : 0));
1013
+ };
1014
+ var remainingScrollViewProps = {
1015
+ onScroll: function (ev) {
1016
+ var _a;
1017
+ (_a = props.onScroll) === null || _a === void 0 ? void 0 : _a.call(props, ev);
1018
+ if (pointerConfig &&
1019
+ pointerConfig.activatePointersOnLongPress &&
1020
+ pointerConfig.autoAdjustPointerLabelPosition) {
1021
+ setScrollX(ev.nativeEvent.contentOffset.x);
1022
+ }
1023
+ },
1024
+ };
1025
+ var renderChartContent = function () {
1026
+ var _a, _b, _c, _d, _e, _f;
1027
+ return (_jsxs(_Fragment, { children: [dataSet
1028
+ ? pointsFromSet.length
1029
+ ? dataSet.map(function (set, index) {
1030
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
1031
+ if (isAnimated) {
1032
+ return renderAnimatedLine((_a = set.zIndex) !== null && _a !== void 0 ? _a : zIndex1, pointsFromSet[index], animatedWidth, (_b = set.thickness) !== null && _b !== void 0 ? _b : thickness1, (_c = set.color) !== null && _c !== void 0 ? _c : color1, fillPointsFromSet[index], (_d = set.startFillColor) !== null && _d !== void 0 ? _d : startFillColor1, (_e = set.endFillColor) !== null && _e !== void 0 ? _e : endFillColor1, (_f = set.startOpacity) !== null && _f !== void 0 ? _f : startOpacity1, (_g = set.endOpacity) !== null && _g !== void 0 ? _g : endOpacity1, (_h = set.strokeDashArray) !== null && _h !== void 0 ? _h : strokeDashArray1, set.showArrow || props.showArrows, arrowPointsFromSet[index], arrowStrokeWidthsFromSet === null || arrowStrokeWidthsFromSet === void 0 ? void 0 : arrowStrokeWidthsFromSet[index], arrowStrokeColorsFromSet === null || arrowStrokeColorsFromSet === void 0 ? void 0 : arrowStrokeColorsFromSet[index], arrowFillColorsFromSet === null || arrowFillColorsFromSet === void 0 ? void 0 : arrowFillColorsFromSet[index], index);
1033
+ }
1034
+ else {
1035
+ return renderLine((_j = set.zIndex) !== null && _j !== void 0 ? _j : zIndex1, pointsFromSet[index], (_k = set.thickness) !== null && _k !== void 0 ? _k : thickness1, (_l = set.color) !== null && _l !== void 0 ? _l : color1, fillPointsFromSet[index], (_m = set.startFillColor) !== null && _m !== void 0 ? _m : startFillColor1, (_o = set.endFillColor) !== null && _o !== void 0 ? _o : endFillColor1, (_p = set.startOpacity) !== null && _p !== void 0 ? _p : startOpacity1, (_q = set.endOpacity) !== null && _q !== void 0 ? _q : endOpacity1, (_r = set.strokeDashArray) !== null && _r !== void 0 ? _r : strokeDashArray1, set.showArrow || props.showArrows, arrowPointsFromSet[index], arrowStrokeWidthsFromSet === null || arrowStrokeWidthsFromSet === void 0 ? void 0 : arrowStrokeWidthsFromSet[index], arrowStrokeColorsFromSet === null || arrowStrokeColorsFromSet === void 0 ? void 0 : arrowStrokeColorsFromSet[index], arrowFillColorsFromSet === null || arrowFillColorsFromSet === void 0 ? void 0 : arrowFillColorsFromSet[index], index);
1036
+ }
1037
+ })
1038
+ : null
1039
+ : isAnimated
1040
+ ? renderAnimatedLine(zIndex1, points, animatedWidth, thickness1, color1, fillPoints, startFillColor1, endFillColor1, startOpacity1, endOpacity1, strokeDashArray1, props.showArrow1 || props.showArrows, arrow1Points, arrowStrokeWidth1, arrowStrokeColor1, arrowFillColor1, 0)
1041
+ : renderLine(zIndex1, points, thickness1, color1, fillPoints, startFillColor1, endFillColor1, startOpacity1, endOpacity1, strokeDashArray1, props.showArrow1 || props.showArrows, arrow1Points, arrowStrokeWidth1, arrowStrokeColor1, arrowFillColor1, 0), secondaryPoints
1042
+ ? isAnimated
1043
+ ? renderAnimatedLine(secondaryLineConfig.zIndex, secondaryPoints, animatedWidth, secondaryLineConfig.thickness, secondaryLineConfig.color, secondaryFillPoints, secondaryLineConfig.startFillColor, secondaryLineConfig.endFillColor, secondaryLineConfig.startOpacity, secondaryLineConfig.endOpacity, secondaryLineConfig.strokeDashArray, secondaryLineConfig.showArrow, secondaryArrowPoints, (_a = secondaryLineConfig.arrowConfig) === null || _a === void 0 ? void 0 : _a.strokeWidth, (_b = secondaryLineConfig.arrowConfig) === null || _b === void 0 ? void 0 : _b.strokeColor, (_c = secondaryLineConfig.arrowConfig) === null || _c === void 0 ? void 0 : _c.fillColor, 6)
1044
+ : renderLine(secondaryLineConfig.zIndex, secondaryPoints, secondaryLineConfig.thickness, secondaryLineConfig.color, secondaryFillPoints, secondaryLineConfig.startFillColor, secondaryLineConfig.endFillColor, secondaryLineConfig.startOpacity, secondaryLineConfig.endOpacity, secondaryLineConfig.strokeDashArray, secondaryLineConfig.showArrow, secondaryArrowPoints, (_d = secondaryLineConfig.arrowConfig) === null || _d === void 0 ? void 0 : _d.strokeWidth, (_e = secondaryLineConfig.arrowConfig) === null || _e === void 0 ? void 0 : _e.strokeColor, (_f = secondaryLineConfig.arrowConfig) === null || _f === void 0 ? void 0 : _f.fillColor, 6)
1045
+ : null, points2
1046
+ ? isAnimated
1047
+ ? renderAnimatedLine(zIndex2, points2, animatedWidth2, thickness2, color2, fillPoints2, startFillColor2, endFillColor2, startOpacity2, endOpacity2, strokeDashArray2, props.showArrow2 || props.showArrows, arrow2Points, arrowStrokeWidth2, arrowStrokeColor2, arrowFillColor2, 1)
1048
+ : renderLine(zIndex2, points2, thickness2, color2, fillPoints2, startFillColor2, endFillColor2, startOpacity2, endOpacity2, strokeDashArray2, props.showArrow2 || props.showArrows, arrow2Points, arrowStrokeWidth2, arrowStrokeColor2, arrowFillColor2, 1)
1049
+ : null, points3
1050
+ ? isAnimated
1051
+ ? renderAnimatedLine(zIndex3, points3, animatedWidth3, thickness3, color3, fillPoints3, startFillColor3, endFillColor3, startOpacity3, endOpacity3, strokeDashArray3, props.showArrow3 || props.showArrows, arrow3Points, arrowStrokeWidth3, arrowStrokeColor3, arrowFillColor3, 2)
1052
+ : renderLine(zIndex3, points3, thickness3, color3, fillPoints3, startFillColor3, endFillColor3, startOpacity3, endOpacity3, strokeDashArray3, props.showArrow3 || props.showArrows, arrow3Points, arrowStrokeWidth3, arrowStrokeColor3, arrowFillColor3, 2)
1053
+ : null, points4
1054
+ ? isAnimated
1055
+ ? renderAnimatedLine(zIndex4, points4, animatedWidth4, thickness4, color4, fillPoints4, startFillColor4, endFillColor4, startOpacity4, endOpacity4, strokeDashArray4, props.showArrow4 || props.showArrows, arrow4Points, arrowStrokeWidth4, arrowStrokeColor4, arrowFillColor4, 3)
1056
+ : renderLine(zIndex4, points4, thickness4, color4, fillPoints4, startFillColor4, endFillColor4, startOpacity4, endOpacity4, strokeDashArray4, props.showArrow4 || props.showArrows, arrow4Points, arrowStrokeWidth4, arrowStrokeColor4, arrowFillColor4, 3)
1057
+ : null, points5
1058
+ ? isAnimated
1059
+ ? renderAnimatedLine(zIndex5, points5, animatedWidth5, thickness5, color5, fillPoints5, startFillColor5, endFillColor5, startOpacity5, endOpacity5, strokeDashArray5, props.showArrow5 || props.showArrows, arrow5Points, arrowStrokeWidth5, arrowStrokeColor5, arrowFillColor5, 4)
1060
+ : renderLine(zIndex5, points5, thickness5, color5, fillPoints5, startFillColor5, endFillColor5, startOpacity5, endOpacity5, strokeDashArray5, props.showArrow5 || props.showArrows, arrow5Points, arrowStrokeWidth5, arrowStrokeColor5, arrowFillColor5, 4)
1061
+ : null, pointerX > 0 ? (_jsxs(View, { pointerEvents: pointerEvents !== null && pointerEvents !== void 0 ? pointerEvents : 'none', style: {
1062
+ position: 'absolute',
1063
+ height: extendedContainerHeight + noOfSectionsBelowXAxis * stepHeight,
1064
+ bottom: 58 + labelsExtraHeight + xAxisLabelsVerticalShift - overflowTop,
1065
+ // width: totalWidth,
1066
+ zIndex: 20,
1067
+ }, children: [!stripOverPointer && renderStripAndLabel(), dataSet ? (renderPointer(0, true)) : (
1068
+ // dataSet.map((set, index) => renderPointer(index))
1069
+ _jsxs(_Fragment, { children: [renderPointer(1), points2 ? renderPointer(2) : null, points3 ? renderPointer(3) : null, points4 ? renderPointer(4) : null, points5 ? renderPointer(5) : null, secondaryPoints ? renderPointer(6) : null, stripOverPointer && renderStripAndLabel()] }))] })) : null, (data0 !== null && data0 !== void 0 ? data0 : data).map(function (item, index) {
1070
+ var _a, _b, _c, _d, _e, _f;
1071
+ var secondaryLabel = (_c = (_a = item.secondaryLabel) !== null && _a !== void 0 ? _a : (_b = secondaryXAxis === null || secondaryXAxis === void 0 ? void 0 : secondaryXAxis.labelTexts) === null || _b === void 0 ? void 0 : _b[index]) !== null && _c !== void 0 ? _c : '';
1072
+ var secondaryLabelTextStyle = (_f = (_e = (_d = item.secondaryLabelTextStyle) !== null && _d !== void 0 ? _d : secondaryXAxis === null || secondaryXAxis === void 0 ? void 0 : secondaryXAxis.labelsTextStyle) !== null && _e !== void 0 ? _e : item.labelTextStyle) !== null && _f !== void 0 ? _f : props.xAxisLabelTextStyle;
1073
+ return (_jsxs(View, { children: [isAnimated
1074
+ ? renderAnimatedLabel(false, index, item.label ||
1075
+ (props.xAxisLabelTexts && props.xAxisLabelTexts[index]
1076
+ ? props.xAxisLabelTexts[index]
1077
+ : ''), item.labelTextStyle || props.xAxisLabelTextStyle, item.labelComponent)
1078
+ : renderLabel(false, index, item.label ||
1079
+ (props.xAxisLabelTexts && props.xAxisLabelTexts[index]
1080
+ ? props.xAxisLabelTexts[index]
1081
+ : ''), item.labelTextStyle || props.xAxisLabelTextStyle, item.labelComponent), secondaryXAxis
1082
+ ? isAnimated
1083
+ ? renderAnimatedLabel(true, index, secondaryLabel, secondaryLabelTextStyle, item.secondaryLabelComponent)
1084
+ : renderLabel(true, index, secondaryLabel, secondaryLabelTextStyle, item.secondaryLabelComponent)
1085
+ : null] }, index));
1086
+ })] }));
1087
+ };
1088
+ return (_jsx(BarAndLineChartsWrapper, __assign({}, barAndLineChartsWrapperProps, { scrollRef: scrollRef, animatedWidth: animatedWidth, renderChartContent: renderChartContent, remainingScrollViewProps: remainingScrollViewProps })));
1089
+ };