Refresh graphs when page becomes visible

We already did this previously, but in an insane way, leading to it
mosly not working.
Fixes #73.