buildDataset();
}
private void buildAutoGeneratedDataSet(final DefaultCategoryDataset categoryDataset)
{
final DataRow dataRow = getDataRow();
// generatedReport == true
// if the generatedReport flag is true, then we are dynamically
// generating the number of columns in the report ...
// We expect additional information in order to get the dataset
// built properly:
// ignoreColumns and categoryStartColumn
final String[] columnNames = dataRow.getColumnNames();
for (int i = categoryStartColumn; i < columnNames.length; i++)
{
String seriesName = columnNames[i];
// TODO What is this all about??
if (!seriesName.startsWith("Summary_"))
{
continue;
}
if (ignoreColumns.contains(seriesName))
{
continue;
}
seriesName = seriesName.substring(8, seriesName.length() - 10);
final Object valueObject = dataRow.get(seriesName);
final Number value = (valueObject instanceof Number) ? (Number) valueObject : null;
categoryDataset.addValue(value, seriesName, seriesName);
}
}