Candidates and outside groups spent nearly $2.4 million, according to Chalkbeat’s tally of final campaign finance reports.