use of org.ff4j.audit.chart.Serie in project ff4j by ff4j.
the class AbstractEventRepository method renderBarChart.
/**
* Convert hicount into pieChart.
*
* @param hitRatio
* current hist ratio
* @return
* pie chart
*/
private BarChart renderBarChart(String title, Map<String, MutableHitCount> hitRatio, List<String> colors) {
BarChart barChart = new BarChart(title);
int idxColor = 0;
for (String key : hitRatio.keySet()) {
Serie<Integer> bar = new Serie<Integer>(key, new Double(hitRatio.get(key).get()).intValue(), colors.get(idxColor));
barChart.getChartBars().add(bar);
idxColor++;
}
orderBarDecrecent(barChart);
return barChart;
}
Aggregations