Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregation is disabled in charting #856 #857

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ private void enableAggEditor(String expression) {
ec.decode(expression);
expression = ec.convertJSExpression(false);

boolean enabled = this.context.getUIFactory().createUIHelper().useDataSetRow(context.getExtendedItem(),
boolean enabled = !this.context.getUIFactory().createUIHelper().useDataSetRow(context.getExtendedItem(),
expression);
fAggEditorComposite.setEnabled(enabled);
} catch (BirtException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ public boolean canCombine(IChartType type, ChartWizardContext context) {

@Override
public boolean useDataSetRow(Object reportItem, String expression) throws BirtException {
// Default implementation, do nothing
return false;
/*
* Default implementation is a bit simple, this behavior is copied from
* org.eclipse.birt.chart.ui.swt.wizard.data.BaseDataDefinitionComponent.
* enableAggEditor( String expression ) prior to the refactoring that yielded
* this method. According to the javadoc it should be more comprehensive though.
*/
return expression.startsWith("data"); //$NON-NLS-1$
}
}