update the diagram class in server side