Magnetism or bonding: A nearly periodic table of transition elements