exportToPNG exports the whole graph whether or not the user can see it in the window