use of org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit in project tdq-studio-se by Talend.
the class DynamicBAWChartEventReceiver method refreshChart.
@Override
public void refreshChart() {
Map<IndicatorUnit, String> indicators2ValueMap = converIndicatorListToMap();
SummaryStatisticsState state = new SummaryStatisticsState(indicators, indicators2ValueMap);
if (!isLastIndicator()) {
state.setSupportDynamicChart(true);
}
state.setSqltype(Types.DOUBLE);
Object chart = state.getChart();
TOPChartUtils.getInstance().decorateChart(chart, false);
if (BAWparentComposite != null) {
TOPChartUtils.getInstance().refrechChart(BAWparentComposite, chart);
}
EventManager.getInstance().publish(chartComposite, EventEnum.DQ_DYNAMIC_REFRESH_DYNAMIC_CHART, null);
}
use of org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit in project tdq-studio-se by Talend.
the class FrequencyDynamicChartEventReceiver method refreshChart.
@Override
public void refreshChart() {
List<IndicatorUnit> indicatorUnits = new ArrayList<IndicatorUnit>();
indicatorUnits.add(new ColumnIndicatorUnit(IndicatorEnum.findIndicatorEnum(this.getIndicator().eClass()), this.getIndicator(), null));
// indicators
FrequencyStatisticsState state = new FrequencyStatisticsState(indicatorUnits);
state.setSupportDynamicChart(true);
Object chart = state.getChart();
TOPChartUtils.getInstance().decorateChart(chart, false);
if (this.parentChartComposite != null) {
TOPChartUtils.getInstance().refrechChart(this.parentChartComposite, chart);
}
EventManager.getInstance().publish(chartComposite, EventEnum.DQ_DYNAMIC_REFRESH_DYNAMIC_CHART, null);
}
use of org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit in project tdq-studio-se by Talend.
the class FrequencyTableState method getDataEntity.
/*
* (non-Javadoc)
*
* @see org.talend.dataprofiler.core.ui.editor.preview.model.states.table.AbstractTableTypeStates#getDataEntity()
*/
@Override
public ChartDataEntity[] getDataEntity() {
List<ChartDataEntity> dataEnities = new ArrayList<ChartDataEntity>();
boolean withRowCountIndicator = isWithRowCountIndicator();
for (IndicatorUnit unit : units) {
if (unit.isExcuted()) {
FrequencyExt[] frequencyExt = (FrequencyExt[]) unit.getValue();
sortIndicator(frequencyExt);
int numOfShown = FrequencyTypeStateUtil.getNumberOfShown(unit, frequencyExt);
for (int i = 0; i < numOfShown; i++) {
FrequencyExt freqExt = frequencyExt[i];
String keyLabel = FrequencyTypeStateUtil.getKeyLabel(freqExt, 30);
dataEnities.add(FrequencyTypeStateUtil.createChartEntity(unit.getIndicator(), freqExt, keyLabel, withRowCountIndicator));
}
} else {
// TDQ-11422: before analysis run turn to Analysis Results page, there should show nothing data
// dataEnities.add(FrequencyTypeStateUtil.createChartEntity(unit.getIndicator(), null, null, false));
}
}
return dataEnities.toArray(new ChartDataEntity[dataEnities.size()]);
}
use of org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit in project tdq-studio-se by Talend.
the class ModeStatisticsTableState method getDataEntity.
/*
* (non-Javadoc)
*
* @see org.talend.dataprofiler.core.ui.editor.preview.model.states.table.AbstractTableTypeStates#getDataEntity()
*/
@Override
public ChartDataEntity[] getDataEntity() {
List<ChartDataEntity> dataEnities = new ArrayList<ChartDataEntity>();
for (IndicatorUnit unit : units) {
ChartDataEntity entity = ModeStatisticsStateUtil.createDataEntity(unit, unit.getIndicatorName());
dataEnities.add(entity);
}
return dataEnities.toArray(new ChartDataEntity[dataEnities.size()]);
}
use of org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit in project tdq-studio-se by Talend.
the class CommonStateUtil method getDataEntity.
public static ChartDataEntity[] getDataEntity(List<IndicatorUnit> units, int style) {
List<ChartDataEntity> dataEnities = new ArrayList<ChartDataEntity>();
for (IndicatorUnit unit : units) {
String value = getUnitValue(unit.getValue(), style);
ChartDataEntity entity = createDataEntity(unit, value, unit.getIndicatorName());
dataEnities.add(entity);
}
return dataEnities.toArray(new ChartDataEntity[dataEnities.size()]);
}
Aggregations