Added diagram type change functionality and updated the diagram util of
the vaadin project.