Okafor was drafted #2 overall in the 2004 NBA Draft. While Okafor has had a decent career, I wouldn't say he's lived up to his pick.
If I'm a Bobcats fan, however, I'm scratching my head. Talent wise, Okafor is much better than Chandler. Both players are somewhat limited offensively, but Okafor can score on post-ups occasionally and make short bank shots, while Chandler's range ends at the restricted area.
Charlotte is already a terrible offensive team, and adding Chandler certainly doesn't help. The Bobcats ranked 27th last year in offensive efficiency. Chandler is a much worse offensive player than Okafor, and his one offensive skill--the famous alley oop with CP3--won't work in Charlotte.
In my opinion, the only positive Charlotte gains out of this is financial flexibility. Last year, the Bobcats agreed to a 6 year, $72M deal with Okafor. Chandler makes roughly $11.5M next season, and has an early termination option next year.
If I'm a Hornets fan, I'm extremely excited about this deal. Replacing Chandler with Okafor is a huge upgrade, and may possibly put the Hornets back into the West's elites.