use of org.talend.dq.indicators.ext.FrequencyExt in project tdq-studio-se by Talend.
the class PieStatisticsState method getCustomerDataset.
public ICustomerDataset getCustomerDataset() {
CustomerDefaultCategoryDataset customerdataset = new CustomerDefaultCategoryDataset();
for (IndicatorUnit unit : units) {
if (unit.isExcuted()) {
FrequencyExt[] frequencyExt = (FrequencyExt[]) unit.getValue();
int numOfShown = PieStatisticsStateUtil.getNumberOfShown(unit, frequencyExt);
for (int i = 0; i < numOfShown; i++) {
FrequencyExt freqExt = frequencyExt[i];
String keyLabel = PieStatisticsStateUtil.getkeyLabel(freqExt);
customerdataset.addValue(freqExt.getValue(), PluginConstant.EMPTY_STRING, keyLabel);
ChartDataEntity entity = PieStatisticsStateUtil.createDataEntity(unit, freqExt, keyLabel);
customerdataset.addDataEntity(entity);
}
}
}
return customerdataset;
}
Aggregations