diff --git a/src/screens/Dashboard/PerformanceLevelGraph.tsx b/src/screens/Dashboard/PerformanceLevelGraph.tsx index 7969de23..d1417f5f 100644 --- a/src/screens/Dashboard/PerformanceLevelGraph.tsx +++ b/src/screens/Dashboard/PerformanceLevelGraph.tsx @@ -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} /> )} - + { height: boxWidth * 1.125, ...GenericStyles.absolute, top: 0, - left: selfLevelPosition, + left: `${selfLevelPosition}%`, }} />