update graph according to solution selected