use of org.talend.dq.indicators.preview.table.ChartDataEntity in project tdq-studio-se by Talend.
the class WhereRuleStatisticsStateTable method addRownCountDataEntity2CustomerDataset.
/**
* DOC xqliu Comment method "addRownCountDataEntity2CustomerDataset".
*
* @param customerDataset
* @param unit
*/
private void addRownCountDataEntity2CustomerDataset(CustomerDefaultCategoryDataset customerDataset, TableIndicatorUnit unit) {
if (IndicatorEnum.RowCountIndicatorEnum.equals(unit.getType())) {
String value = CommonStateUtil.getUnitValue(unit.getValue(), StringFormatUtil.DOUBLE_NUMBER);
String label = unit.getIndicatorName();
customerDataset.addValue(Double.parseDouble(value), label, label);
ChartDataEntity entityCount = CommonStateUtil.createDataEntity(unit, value, label);
customerDataset.addDataEntity(entityCount);
}
}
Aggregations