Modify updateextremegrades in TrendsGraph