improved selection in diagrams