BP said on Thursday it would build a network of electric-vehicle charging hubs in China with China’s Didi Chuxing as the British firm bets on the world’s largest market for such cars to help profits during the transition from oil to cleaner fuels.