Consolidate graph display logic into updateGraph()