Generate diagrams controller