use of com.extjs.gxt.charts.client.model.charts.BarChart.Bar in project activityinfo by bedatadriven.
the class ChartOFCView method addBarSeries.
private void addBarSeries(ChartModel cm, List<PivotTableData.Axis> categories, List<PivotTableData.Axis> series) {
int index = 0;
for (PivotTableData.Axis s : series) {
String color = Theme.getAccent(index++);
FilledBarChart bchart = new FilledBarChart(color, color);
bchart.setTooltip("#x_label#<br>#val#");
for (PivotTableData.Axis category : categories) {
PivotTableData.Cell cell = category.getCell(s);
double value = cell == null ? 0 : cell.getValue();
Bar bar = new Bar(value);
bar.setValue(value);
bar.setTooltip(formatTooltip(s, category, value));
bar.setValue(value);
bchart.addBars(bar);
}
cm.addChartConfig(bchart);
}
}
Aggregations