make graph buttons do the right thing