if (chartExpression instanceof MultiPlotChartExpression == false)
{
continue;
}
final MultiPlotChartExpression multiPlotChartExpression = (MultiPlotChartExpression) chartExpression;
final Object secondaryDataSourceExpression = element.getAttribute
(LegacyChartElementModule.NAMESPACE, LegacyChartElementModule.SECONDARY_DATA_COLLECTOR_FUNCTION_ATTRIBUTE);
if (secondaryDataSourceExpression instanceof Expression)
{
final Expression datasetExpression = (Expression) secondaryDataSourceExpression;
final Expression datasetExpressionInstance = datasetExpression.getInstance();
final String name = AutoGeneratorUtility.generateUniqueExpressionName
(dataSchema, "::legacy-charts::secondary-dataset::{0}", reportDefinition);
datasetExpressionInstance.setName(name);
multiPlotChartExpression.setSecondaryDataSet(name);
reportDefinition.addExpression(datasetExpressionInstance);
}
}
}