@SuppressWarnings("unchecked")
protected Element createBar(OFC ofc, int s) {
FilledBarChart e = new FilledBarChart();
// TODO Create the property OutlineColour
e.setOutlineColour("#577261");
if (ofc.getPallete() != null) {
e.setColour(ofc.getPallete()[s]);
} else {
e.setColour("#E2D66A");
}
Comparable serie = model.getSeries(s);
e.setText((String) serie);
List<Number> values = new ArrayList<Number>();
for (Iterator itCategories = model.getCategories().iterator(); itCategories
.hasNext();) {
Comparable category = (Comparable) itCategories.next();
Number n = model.getValue(serie, category);
if (n.doubleValue() < minValue) {
minValue = n.doubleValue();
}
if (n.doubleValue() > maxValue) {
maxValue = n.doubleValue();
}
values.add(n);
}
e.addValues(values);
return e;
}