Package com.dianping.cat.report.page.PieChart

Examples of com.dianping.cat.report.page.PieChart.Item


    for (CacheNameItem cacheItem : nameItems) {
      String name = cacheItem.getName().getId();

      if (name.endsWith(":get") || name.endsWith(":mGet")) {
        items.add(new Item().setTitle(name).setNumber(cacheItem.getName().getTotalCount()));
      }
    }
    chart.addItems(items);
    return chart.getJsonString();
  }
View Full Code Here


    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);
View Full Code Here

    }
    return new Pair<Integer, String>(keyValue, title);
  }

  private Pair<Integer, Item> buildPieChartItem(int command, AppDataCommand data, AppDataGroupByField field) {
    Item item = new Item();

    item.setNumber(data.getAccessNumberSum());
    Pair<Integer, String> pair = buildPieChartFieldTitlePair(command, data, field);
    item.setTitle(pair.getValue());
    return new Pair<Integer, Item>(pair.getKey(), item);
  }
View Full Code Here

    PieChart chart = new PieChart();
    List<Item> items = new ArrayList<Item>();

    for (int i = 1; i < names.size(); i++) {
      TransactionNameModel name = names.get(i);
      Item item = new Item();
      TransactionName transaction = name.getDetail();
      item.setNumber(transaction.getTotalCount()).setTitle(transaction.getId());
      items.add(item);
    }

    chart.addItems(items);
    model.setPieChart(new JsonBuilder().toJson(chart));
View Full Code Here

      List<Item> items = new ArrayList<Item>();
      Statistic values = entry.getValue();
      Map<String, StatisticsItem> statisticsItems = values.getStatisticsItems();

      for (StatisticsItem tmp : statisticsItems.values()) {
        Item item = new Item();

        item.setNumber(tmp.getCount());
        item.setTitle(tmp.getId());
        items.add(item);
      }
      chart.setTitle(entry.getKey());
      chart.addItems(items);
      charts.add(chart);
View Full Code Here

      addLastMinuteData(current, all, m_lastMinute, endDate);
      lineChart.setSize(value.length);
      lineChart.add(entry.getKey(), current);

      double sum = computeSum(current);
      items.add(new Item().setTitle(entry.getKey()).setNumber(sum));
    }
    return new Pair<LineChart, PieChart>(lineChart, pieChart);
  }
View Full Code Here

    PieChart chart = new PieChart();
    List<Item> items = new ArrayList<Item>();

    for (int i = 1; i < names.size(); i++) {
      EventNameModel name = names.get(i);
      Item item = new Item();
      EventName event = name.getDetail();
      item.setNumber(event.getTotalCount()).setTitle(event.getId());
      items.add(item);
    }

    chart.addItems(items);
    model.setPieChart(new JsonBuilder().toJson(chart));
View Full Code Here

  public PieChart getPieChart() {
    PieChart chart = new PieChart();
    List<Item> items = new ArrayList<Item>();

    for (java.util.Map.Entry<String, Integer> entry : m_items.entrySet()) {
      Item item = new Item();

      item.setNumber(entry.getValue()).setTitle(entry.getKey());
      items.add(item);
    }
    chart.addItems(items);
   
    return chart;
View Full Code Here

TOP

Related Classes of com.dianping.cat.report.page.PieChart.Item

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.