starting/stopping graphing on tab switching