// Calculate the data set to display.
// Set the scalar function to apply for the calculations of the chart values.
ScalarFunction scalarFunction = scalarFunctionManager.getScalarFunctionByCode(SumFunction.CODE);
barChartDisplayer.setRangeScalarFunction(scalarFunction);
DataSet xyDataSet = barChartDisplayer.buildXYDataSet();
// Check the expected results matrix
assertDataSetValues(xyDataSet, new String[][] {
new String[] {"Engineering", "7,650.162"},
new String[] {"Services", "2,504.5"},