An explosion and fire near a chemical factory have left at least 23 people dead and 22 others injured in a northern China city that will host the 2022 Winter Olympics.