use of org.talend.dataprofiler.core.ui.events.PatternDynamicChartEventReceiver in project tdq-studio-se by Talend.
the class AnalysisUtils method createDynamicChartEventReceiver.
/**
* create a DynamicChart Event Receiver, according to its type
*
* @param categoryDataset
* @param index
* @param oneIndicator
* @param eIndicatorChartType
* @return
*/
public static DynamicChartEventReceiver createDynamicChartEventReceiver(DynamicIndicatorModel indicatorModel, int index, Indicator oneIndicator) {
DynamicChartEventReceiver eReceiver = null;
if (isBenford(indicatorModel.getChartType())) {
eReceiver = new BenfordFrequencyDynamicChartEventReceiver();
((BenfordFrequencyDynamicChartEventReceiver) eReceiver).setSecondDataset(indicatorModel.getSecondDataset());
} else if (isFrequency(indicatorModel.getChartType())) {
// TDQ-12870, should clear the last result
oneIndicator.setCount(0l);
eReceiver = new FrequencyDynamicChartEventReceiver();
} else if (isPattern(indicatorModel.getChartType())) {
eReceiver = new PatternDynamicChartEventReceiver();
} else {
eReceiver = new DynamicChartEventReceiver();
}
eReceiver.setDataset(indicatorModel.getDataset());
eReceiver.setIndexInDataset(index);
eReceiver.setIndicatorName(oneIndicator.getName());
eReceiver.setIndicator(oneIndicator);
return eReceiver;
}
Aggregations