             var slope = self.getSlope(firstBalance: firstBalance, lastBalance: lastBalance)
             let zeroDate = self.predictZeroDate(firstBalance: firstBalance, lastBalance: lastBalance, slope: slope)
             let endBalance = self.predictSemesterEndBalance(firstBalance: firstBalance, lastBalance: lastBalance, slope: slope)
-            let fullSemester = firstBalance.date.distance(to: Date.endOfSemester)
+            let fullSemester = Date.startOfSemester.distance(to: Date.endOfSemester)
             let fullZeroDistance = firstBalance.date.distance(to: zeroDate)
             let deltaX = fullZeroDistance / fullSemester
-            slope = -1 / deltaX // Resetting slope to different value for graph format
+            let deltaY = firstBalance.balance / maxBalance.balance
+            slope = -deltaY / deltaX // Resetting slope to different value for graph format
             return (slope, zeroDate, endBalance)
         }
     }

            Storage.remove(DiningAnalyticsViewModel.swipeHistoryDirectory, from: .documents)
        }
    }
    func refresh() {
        guard let diningToken = KeychainAccessible.instance.getDiningToken() else {
            return
        }

            startDate = Calendar.current.date(byAdding: .day, value: 1, to: startDate)!
        }
        let startDateStr = formatter.string(from: startDate)
        DiningAPI.instance.getPastDiningBalances(diningToken: diningToken, startDate: startDateStr) { (balances) in
            guard let balances = balances else {
                return
