But if the charging unit can only reach one of the targets it's declared against, it completes the charge against the one it can reach. (Example: You have a unit of 3 ogres. You declare a charge on a lone character with another lone character next to it, one inch apart. the only way to contact the charged character is to also touch the 2nd character, so you declare a charge on it as well. One character holds, the other flees. You can't reach the fled character, but can hit the one that held. No crazy shenanigans here. The charge doesn't fail; you simply complete against the one target that you can reach.)
In my example, after the first skirmisher flees, I cannot complete the charge without contacting another unit– The only possible moves to make contact are blocked by the unit it fled behind, so I literally "can't complete my charge without touching another enemy unit." The declaration of the charge was a legal declaration, but his placement and flee has resulted in this situation. Every move I would try would end up with me touching the other unit on the way in. Therefore, I must declare a charge against the blocking unit. If, after both charged units have resolved their reactions, I can't contact both, then I complete against the one that I can reach.
(Tobiothan, your example wouldn't work, because you can't declare a charge that's impossible to complete. There's no way to contact the green unit, so it can't be declared.)