Add @id values for the diagrams.