This all depends on the ground and how much or little gap is acceptable under the fence.
If the ground is flat or the grade is consistent, then the fence should be flat or straight.
If the ground has dips or humps the top of the fence must mirror the bottom.
*It always looks better when the fence is straight on top, but this often means the customer must backfill the fence line with dirt where gaps appear to avoid dogs getting under.
*Some fence lines fluctuate too much in grade to ever consider being straight on top.