use of org.talend.dq.indicators.preview.table.PatternChartDataEntity in project tdq-studio-se by Talend.
the class PatternDynamicChartEventReceiver method refreshTable.
/*
* (non-Javadoc)
*
* @see org.talend.dataprofiler.core.ui.events.DynamicChartEventReceiver#refreshTable(java.lang.String)
*/
@Override
public void refreshTable(String value) {
TableWithData input = (TableWithData) tableViewer.getInput();
if (input != null) {
ChartDataEntity[] dataEntities = input.getEnity();
if (dataEntities != null && dataEntities.length > getIndexInDataset()) {
((PatternChartDataEntity) dataEntities[getIndexInDataset()]).setNumMatch(value);
((PatternChartDataEntity) dataEntities[getIndexInDataset()]).setNumNoMatch(value);
tableViewer.getTable().clearAll();
tableViewer.setInput(input);
}
}
}
use of org.talend.dq.indicators.preview.table.PatternChartDataEntity in project tdq-studio-se by Talend.
the class PatternStatisticeStateUtil method createDataEntity.
/**
* DOC yyin Comment method "createDataEntity".
*
* @param unit
* @param label
* @param notMathCount
* @param machCount
* @return
*/
public static PatternChartDataEntity createDataEntity(IndicatorUnit unit, String label, String notMathCount, String machCount) {
PatternChartDataEntity patternEntity = new PatternChartDataEntity();
patternEntity.setIndicator(unit.getIndicator());
patternEntity.setLabel(label);
patternEntity.setNumMatch(machCount);
patternEntity.setNumNoMatch(notMathCount);
return patternEntity;
}
use of org.talend.dq.indicators.preview.table.PatternChartDataEntity in project tdq-studio-se by Talend.
the class RedundancyAnalysisResultPage method creatChart.
private void creatChart(Composite parent, String tableA, String tableB) {
CustomerDefaultCategoryDataset dataset = new CustomerDefaultCategoryDataset();
// DefaultCategoryDataset dataset = new DefaultCategoryDataset();
dataset.addValue(rowMatchingIndicatorA.getNotMatchingValueCount(), NOT_MATCHING, tableA);
dataset.addValue(rowMatchingIndicatorA.getMatchingValueCount(), MATCHING, tableA);
// add by hcheng
PatternChartDataEntity dataEntityA = new PatternChartDataEntity();
dataEntityA.setLabel(tableA);
dataEntityA.setIndicator(rowMatchingIndicatorA);
dataEntityA.setNumMatch(rowMatchingIndicatorA.getMatchingValueCount().toString());
dataEntityA.setNumNoMatch(rowMatchingIndicatorA.getNotMatchingValueCount().toString());
dataset.addDataEntity(dataEntityA);
if (!isHasDeactivatedIndicator) {
dataset.addValue(rowMatchingIndicatorB.getNotMatchingValueCount(), NOT_MATCHING, tableB);
dataset.addValue(rowMatchingIndicatorB.getMatchingValueCount(), MATCHING, tableB);
PatternChartDataEntity dataEntityB = new PatternChartDataEntity();
dataEntityB.setLabel(tableB);
dataEntityB.setIndicator(rowMatchingIndicatorB);
dataEntityB.setNumMatch(rowMatchingIndicatorB.getMatchingValueCount().toString());
dataEntityB.setNumNoMatch(rowMatchingIndicatorB.getNotMatchingValueCount().toString());
dataset.addDataEntity(dataEntityB);
}
Object chart = TOPChartUtils.getInstance().createStackedBarChart(// $NON-NLS-1$
DefaultMessagesImpl.getString("ColumnsComparisonAnalysisResultPage.ColumnsComparison"), // $NON-NLS-1$
dataset, true, true);
final Object chartComp = TOPChartUtils.getInstance().createChartComposite(parent, SWT.NONE, chart, true);
// add by hcheng for 6530(add menu to "View query result" for chart )
addMenuToChartComp(chartComp, new RowMatchExplorer(), getAnalysisHandler().getAnalysis(), ((ICustomerDataset) dataset).getDataEntities());
}
Aggregations