The shooting was the latest in a series of attacks on U.S. political figures that have underscored a sharp rise in political violence.