Search in sources :

Example 1 with CustomerXYSeriesCollection

use of org.talend.dataprofiler.core.ui.editor.preview.model.dataset.CustomerXYSeriesCollection in project tdq-studio-se by Talend.

the class WhereRuleStatisticsStateTable method getCustomerXYDataset.

@Override
public ICustomerDataset getCustomerXYDataset() {
    Map<Integer, Double> valueMap = new HashMap<Integer, Double>();
    int x = 0;
    for (TableIndicatorUnit unit : units) {
        x++;
        double y = 100 * (1 - (Double.parseDouble(unit.getValue().toString()) / getRowCount()));
        valueMap.put(x, y);
    }
    final CustomerXYSeriesCollection dataset = new CustomerXYSeriesCollection(valueMap);
    return dataset;
}
Also used : HashMap(java.util.HashMap) CustomerXYSeriesCollection(org.talend.dataprofiler.core.ui.editor.preview.model.dataset.CustomerXYSeriesCollection) TableIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.TableIndicatorUnit)

Aggregations

HashMap (java.util.HashMap)1 TableIndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.TableIndicatorUnit)1 CustomerXYSeriesCollection (org.talend.dataprofiler.core.ui.editor.preview.model.dataset.CustomerXYSeriesCollection)1