Graph export to image funtionality optimization