update graph layout