List<Item> items = new ArrayList<Item>();
List<AppDataCommand> datas = m_appDataService.queryAppDataCommandsByField(entity, field);
for (AppDataCommand data : datas) {
Pair<Integer, Item> pair = buildPieChartItem(entity.getCommand(), data, field);
Item item = pair.getValue();
PieChartDetailInfo info = new PieChartDetailInfo();
info.setId(pair.getKey()).setTitle(item.getTitle()).setRequestSum(item.getNumber());
infos.add(info);
items.add(item);
}
pieChart.setTitle(field.getName() + "访问情况");
pieChart.addItems(items);