Sorry guys.
There are two options you can specify for UI tabs, I forget off the top of my head what they are (there's an example of it's usage in the docs for UI tabs). One is for a function to be run when a tab is clicked, the other for after the tab is loaded. So all I had to do was set the text to loading in the clicked option, do the redrawing of graphs, and then in the after load function, change the text back to what it was.