Working with diagrams and their components