Updating logic to prevent empty graph from showing up (recalculate scale)