A shopper walks past price tags for vegetables at a supermarket in Hangzhou in eastern China's Zhejiang province Tuesday, July 9, 2013. China's inflation rose in June but was well below the government's target in a sign of weak demand amid an economic slowdown. A vegetable vendor cuts a wax gourd in a market in Hefei in central China's Anhui province Tuesday, July 9, 2013. BEIJING (AP) - China's inflation rose in June but was well below the government's target in a sign of weak demand amid an economic slowdown. Consumer prices rose 2.7 percent over a year earlier, up from May's 2.1 percent gain but below the 3.5 percent official target for the year, the government reported Tuesday. The June figure was driven by a 4.9 percent rise in food costs. Pressure for prices to rise is relatively low in China because of weak demand, excess production capacity in many industries and lower costs for raw materials and components. June prices were unchanged from May levels, and the uptick in the inflation rate was due to comparison with unusually low prices last year, according to Alaistair Chan of Moody's Analytics. "The inflationary environment in China remains largely nonexistent," Chan said in a report. Non-food inflation is low, reflecting a large output gap and lack of policy stimulus. Economic growth slowed to 7.7 percent in the first quarter of this year from the previous quarter's 7.9 percent. Some forecasters say it could dip below 7 percent in coming quarters due to government efforts to cool a credit boom and weak demand for Chinese exports. Communist leaders are trying to shift the basis of China's economic growth from exports and investment to domestic consumption. They have refrained from launching new stimulus spending even as economic growth drifted down. Producer prices declined 2.7 percent in June compared with a year earlier, the National Bureau of Statistics reported. That was driven by an 8.5 percent fall in the price of goods from the mining industry and weaker costs for other industrial raw materials. "This trend will continue through to year end, judging by the government's signals and the outlook for global growth," said Chan of Moody's.