The cannon works in both editions in exactly the same way: the cannon ball travels in a straight line, and every model under that line is hit. However, in ranked-up units, only one model per rank can be hit, even if more models in the same rank would be under the line. If the cannon is in the flank of the target, files will count as ranks.
The (single) 6th edition diagram depicts the simplest situation, in which only one model per rank is under the line anyway; the two 7th edition diagrams clarify the rule better, by depicting situations where several models in the same rank are under the line, one of which will be actually hit.
And welcome to the forum!