An explosion at a chemical factory in China has killed 47 people.