graph height isn't being recalculated correctly based on legend height