if (app().settings().getBoolean(Keys.web.generateActivityGraph, true)) {
// build google charts
Charts charts = new Flotr2Charts();
// active repositories pie chart
Chart chart = charts.createPieChart("chartRepositories", getString("gb.activeRepositories"),
getString("gb.repository"), getString("gb.commits"));
for (Metric metric : repositoryMetrics.values()) {
chart.addValue(metric.name, metric.count);
}
chart.setShowLegend(false);
String url = urlFor(SummaryPage.class, null).toString() + "?r=";
chart.setClickUrl(url);
charts.addChart(chart);
// active authors pie chart
chart = charts.createPieChart("chartAuthors", getString("gb.activeAuthors"),
getString("gb.author"), getString("gb.commits"));
for (Metric metric : authorMetrics.values()) {
chart.addValue(metric.name, metric.count);
}
chart.setShowLegend(false);
charts.addChart(chart);
add(new HeaderContributor(charts));
frag.add(new Fragment("charts", "chartsFragment", this));
} else {