When inspecting a Pokemon I've captured, some have "progress" made on the bar behind the Pokemon's portrait, however some do not. For example, I have four Drowzee - at 12, 13, 14 and 72 CP. The one with 72 CP has over half of the bar filled, while the other three do not have any of the bar filled.
Now I also have a Rattata at 35 CP, who has a similar amount of progress made on the bar - even though it as it a significantly lower CP.
Since the bar does not appear to be proportionate to a Pokemon's CP (contrary to comments), what does this bar mean, how do I fill it, and what happens when it fills up?