(1.25 * chartData.series[2].data[0]) is reused and recalculated in the loop but chartData.series[2] is not mutated during the loop.  I would move this out to a variable like 'predictionCeiling'.