I'll take a stab....
In my experience TWS uses a pessimistic ASK price + a pessimistic commission to give you a pessimistic chart. It can't tell you the exact commissions at this point because it depends on the exchanges you get filled on. The higher the spreads the more it gets wonky.
I always calculate my max profit and max loss AFTER the trade is done. The performance chart just gives you an idea of the shape of the curve. You should use it to make sure you got the buy/sell +/- right.
In this case for a bull debit spread your max loss would be the price of the spread, say 4.55.
Your max gain would be the spread width - the cost of the spread, or 10-4.55 = 5.45.