China's consumer price index (CPI), a main gauge of inflation, edged up 0.2 percent year on year in June, official data showed on Wednesday.