TP-0 | Indicator Fix

This commit is contained in:
yashmantri
2023-10-10 10:49:22 +05:30
parent b5ea8fbeea
commit d217b6882e

View File

@@ -38,8 +38,7 @@ const PerformanceLevelGraph = () => {
const isBiggerBox = (box: Box) => box.id === performanceLevel?.currentLevel;
const selfLevelPosition =
((cashCollectedTillDate.self - cashCollectedTillDate.belowLevel) *
POINTER_POSITION_MULTIPLIER) /
((cashCollectedTillDate.self - cashCollectedTillDate.belowLevel) * 100) /
(cashCollectedTillDate.aboveLevel - cashCollectedTillDate.belowLevel + 1); // if denominator difference is 0 we are adding it to 1, to avoid calculation error, this should never happen i
const getBoxStyles = (box: Box) => {
@@ -82,7 +81,7 @@ const PerformanceLevelGraph = () => {
containerStyle={styles.dashedLineRight}
/>
)}
<View style={[styles.triangle, { left: selfLevelPosition - 5 }]} />
<View style={[styles.triangle, { left: `${selfLevelPosition - 7}%` }]} />
<DashedLine
dashGap={-1}
dashThickness={1.5}
@@ -92,7 +91,7 @@ const PerformanceLevelGraph = () => {
height: boxWidth * 1.125,
...GenericStyles.absolute,
top: 0,
left: selfLevelPosition,
left: `${selfLevelPosition}%`,
}}
/>
<Text