Rising commodity prices couldn’t keep shoppers away from the mall last month, according to sales data released Thursday that showed consumers are spending more on luxury items and apparel.

The report from the International Council of Shopping Centers showed that sales at roughly 30 of the nation’s largest chain stores rose 2 percent in March from a year ago, with several retailers beating expectations. Wholesale clubs and high-end department stores posted the best results, and many chains said they expect April sales to be stronger, thanks to the Easter holiday.

“A lot of us had the events in the world on our minds,” said Alison Paul, vice chairman and U.S. retail leader at consulting firm Deloitte. “I think it was a little bit a sigh of relief that the numbers were more positive than negative.”

The data track sales at stores open at least a year — viewed as a key measure of a retailer’s health — for widely recognized companies such as Macy’s, Target and Gap. Although analysts estimate that the sales figures represent only a small portion of the retail industry, they offer a window into how consumers are faring during the nation’s slow economic recovery.

Retailers have been worried that rising fuel and food prices are eating into shoppers’ wallets, but the March sales suggest that consumers may be able to absorb some of those costs. Costco said its U.S. sales jumped 11 percent in March, with higher fuel prices boosting those results by four percentage points because many of its stores sell gasoline.

Several apparel retailers also enjoyed double-digit sales increases last month. Sales at Limited Brands rose 14 percent, the most of any retailer, driven by a 19 percent boost at Victoria’s Secret. Luxury retailer Saks reported 11 percent sales growth in March, and Tandy Leather Factory’s sales rose 10 percent.

Kantar Retail senior economist Frank Badillo said the fact that consumers continue to spend on discretionary purchases is an encouraging sign. The recent improvement in the unemployment rate and the gains in income have helped offset inflation in other areas, he said.

In addition, Badillo said retailers have yet to pass on higher prices for commodities such as cotton. Although food and energy prices have risen significantly this year, apparel prices declined in February. March data are not yet available.

“When those supply-side cost pressures get to the consumer level, they are often watered down,” Badillo said.

Madison Riley, managing director at retail consulting firm Kurt Salmon, said he expects price increases to show up in stores by the end of the year, with several of his clients planning to raise prices 10 to 15 percent. He said shoppers are likely to continue to pay premium prices for brands they like but may purchase fewer items.

“You just can’t escape these material prices, no matter what you do,” he said.

Not all retailers pulled off a strong March, however. Sales at discounters dropped 4.4 percent, according to the ICSC. Gap reported a 10 percent decline in sales, partly attributed to the Japanese disaster’s effect on its international stores.