public final class ComplexDataCondition extends Condition
The supported members of the ComplexDataCondition class allows you to customize the conditions for a ConditionalAttributes.
This class includes the conditions that a data value has to meet in order to display the configured conditional attributes.
To change the MarkerSize of all points greater than 50:
Expressions.TreeFilteringCondition filtCond;
filtCond = new Expressions.TreeFilteringCondition();
filtCond.setTree(new Expressions.NumericGreaterThan(((NumericDataField)chart1.getDataSourceSettings().getDataFields().get("Value")), 50.0));
ComplexDataCondition cdc;
cdc = new ComplexDataCondition();
cdc.setFiltering(filtCond);
ConditionalAttributes condition1;
condition1 = new ConditionalAttributes();
condition1.setCondition(cdc);
condition1.setMarkerSize((short)4);
chart1.getConditionalAttributes().add((condition1));

| Constructor and Description |
|---|
ComplexDataCondition()
Constructs a newly allocated ComplexDataCondition object
|
ComplexDataCondition(com.softwarefx.server.data.expressions.IFilteringCondition filteringCondition)
Constructs a newly allocated ComplexDataCondition object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
evaluate(double value)
Description goes here
|
com.softwarefx.server.data.expressions.IFilteringCondition |
getFiltering()
This property allows you to filter certain points based on a determined criteria. |
void |
setFiltering(com.softwarefx.server.data.expressions.IFilteringCondition value)
This property allows you to filter certain points based on a determined criteria. |
getDataElement, getDataField, isActive, isInverse, resetActive, resetDataElement, resetInverse, setActive, setDataElement, setDataField, setInversepublic ComplexDataCondition()
public ComplexDataCondition(com.softwarefx.server.data.expressions.IFilteringCondition filteringCondition)
filteringCondition - public com.softwarefx.server.data.expressions.IFilteringCondition getFiltering()
This property allows you to filter certain points based on a determined criteria.
There are 3 different ways of passing a filter to a chart. Using delegate, tree or Lambda conditions.
This method requires the conditions in order to display the configured conditional attributes.
Example:
When the filtering condition is met, the MarkerShape of all points greater than 2000 will be a triangle.
PopulateCarProduction_Sedan(chart1);
chart1.getTitles().add(new TitleDockable("Sedan Production"));
Expressions.TreeFilteringCondition filtCond;
filtCond = new Expressions.TreeFilteringCondition();
filtCond.setTree(new Expressions.NumericGreaterThan(((NumericDataField)chart1.getDataSourceSettings().getDataFields().get("Sedan")), 2000.0));
ComplexDataCondition cdc;
cdc = new ComplexDataCondition();
cdc.setFiltering(filtCond);
ConditionalAttributes condition1;
condition1 = new ConditionalAttributes();
condition1.setCondition(cdc);
condition1.setMarkerShape(MarkerShape.TRIANGLE);
chart1.getConditionalAttributes().add((condition1));
public static void PopulateCarProduction_Sedan(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
// Since not all the fields in the DataSource are required, we must specify the number
// of series that will be contained in the chart and perform the corresponding bindings
chart1.getData().setSeries(1);
NumericDataField numericFieldSedan = new NumericDataField();
numericFieldSedan.setDataPath("Sedan");
chart1.getDataSourceSettings().getDataFields().add(numericFieldSedan);
chart1.getSeries().get(0).getBindings().setY(numericFieldSedan);
StringDataField stringField = new StringDataField();
stringField.setDataPath("Month");
chart1.getDataSourceSettings().getDataFields().add(stringField);
chart1.getAxisX().getBindings().setLabel(stringField);
}
public static void PopulateCarProduction(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class CarProduction {
private CarProduction(String month, int sedan, int coupe, int SUV) {
this.setMonth(month);
this.setSedan(sedan);
this.setCoupe(coupe);
this.setSUV(SUV);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private int privateSedan;
public final int getSedan() {
return privateSedan;
}
public final void setSedan(int value) {
privateSedan = value;
}
private int privateCoupe;
public final int getCoupe() {
return privateCoupe;
}
public final void setCoupe(int value) {
privateCoupe = value;
}
private int privateSUV;
public final int getSUV() {
return privateSUV;
}
public final void setSUV(int value) {
privateSUV = value;
}
}
public void setFiltering(com.softwarefx.server.data.expressions.IFilteringCondition value)
This property allows you to filter certain points based on a determined criteria.
There are 3 different ways of passing a filter to a chart. Using delegate, tree or Lambda conditions.
This method requires the conditions in order to display the configured conditional attributes.
Example:
When the filtering condition is met, the MarkerShape of all points greater than 2000 will be a triangle.
PopulateCarProduction_Sedan(chart1);
chart1.getTitles().add(new TitleDockable("Sedan Production"));
Expressions.TreeFilteringCondition filtCond;
filtCond = new Expressions.TreeFilteringCondition();
filtCond.setTree(new Expressions.NumericGreaterThan(((NumericDataField)chart1.getDataSourceSettings().getDataFields().get("Sedan")), 2000.0));
ComplexDataCondition cdc;
cdc = new ComplexDataCondition();
cdc.setFiltering(filtCond);
ConditionalAttributes condition1;
condition1 = new ConditionalAttributes();
condition1.setCondition(cdc);
condition1.setMarkerShape(MarkerShape.TRIANGLE);
chart1.getConditionalAttributes().add((condition1));
public static void PopulateCarProduction_Sedan(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
// Since not all the fields in the DataSource are required, we must specify the number
// of series that will be contained in the chart and perform the corresponding bindings
chart1.getData().setSeries(1);
NumericDataField numericFieldSedan = new NumericDataField();
numericFieldSedan.setDataPath("Sedan");
chart1.getDataSourceSettings().getDataFields().add(numericFieldSedan);
chart1.getSeries().get(0).getBindings().setY(numericFieldSedan);
StringDataField stringField = new StringDataField();
stringField.setDataPath("Month");
chart1.getDataSourceSettings().getDataFields().add(stringField);
chart1.getAxisX().getBindings().setLabel(stringField);
}
public static void PopulateCarProduction(Chart chart1) {
CarProduction[] production = new CarProduction[] {
new CarProduction("Jan", 1760, 535, 695 ) ,
new CarProduction("Feb", 1849, 395, 688 ) ,
new CarProduction("Mar", 2831, 685, 1047 ) ,
new CarProduction("Apr", 2851, 984, 1652 ) ,
new CarProduction("May", 2961, 1579, 1889 ) ,
new CarProduction("Jun", 1519, 1539, 1766 ) ,
new CarProduction("Jul", 2633, 1489, 1361 ) ,
new CarProduction("Aug", 1140, 650, 874 ) ,
new CarProduction("Sep", 1626, 653, 693 ) ,
new CarProduction("Oct", 1478, 2236, 786 ) ,
new CarProduction("Nov", 1306, 1937, 599 ) ,
new CarProduction("Dec", 1607, 2138, 678 )
};
ObjectProvider objProvider = new ObjectProvider(production);
chart1.getDataSourceSettings().setDataSource(objProvider);
}
public static class CarProduction {
private CarProduction(String month, int sedan, int coupe, int SUV) {
this.setMonth(month);
this.setSedan(sedan);
this.setCoupe(coupe);
this.setSUV(SUV);
}
private String privateMonth;
public final String getMonth() {
return privateMonth;
}
public final void setMonth(String value) {
privateMonth = value;
}
private int privateSedan;
public final int getSedan() {
return privateSedan;
}
public final void setSedan(int value) {
privateSedan = value;
}
private int privateCoupe;
public final int getCoupe() {
return privateCoupe;
}
public final void setCoupe(int value) {
privateCoupe = value;
}
private int privateSUV;
public final int getSUV() {
return privateSUV;
}
public final void setSUV(int value) {
privateSUV = value;
}
}
value - 2014 Software FX, Inc. All Rights Reserved. Chart FX is a registered trademark of Software FX, Inc
All other names are trademarks or registered trademarks of their respective owners.