Class AttributeSortItem
- java.lang.Object
-
- com.gooddata.sdk.model.executeafm.resultspec.AttributeSortItem
-
- All Implemented Interfaces:
SortItem
public class AttributeSortItem extends java.lang.Object implements SortItem
Define sort by specific attributeWith "aggregation" active you can sort all elements of attribute by "aggregation fn" applied to all valid values belonging to each element. This is extremely useful when sorting stacked visualizations like stack bar/area charts. Currently supported is only "sum", see
AttributeSortAggregationSimple example (dimension = Year, measureGroup; 2 metrics; sort on Year with aggregation="sum", descending):
Year 2006 2007 Names M1 M2 M1 M2 Values 1 2 3 4
We take all values belonging to each attribute element of chosen attribute and apply selected function (sum) on them. Notice that we are summarising values from different metrics:
2006 (1 + 2 = 3) 2007 (3 + 4 = 7)
After that we shuffle year attribute elements related to results from "sum" function:
Year 2007 2006 Names M1 M2 M1 M2 Values 3 4 1 2
-
-
Constructor Summary
Constructors Constructor Description AttributeSortItem(Direction direction, java.lang.String attributeIdentifier)AttributeSortItem(Direction direction, java.lang.String attributeIdentifier, AttributeSortAggregation aggregation)AttributeSortItem(java.lang.String direction, java.lang.String attributeIdentifier)AttributeSortItem(java.lang.String direction, java.lang.String attributeIdentifier, java.lang.String aggregation)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetAggregation()java.lang.StringgetAttributeIdentifier()java.lang.StringgetDirection()java.lang.StringtoString()
-
-
-
Constructor Detail
-
AttributeSortItem
public AttributeSortItem(java.lang.String direction, java.lang.String attributeIdentifier, java.lang.String aggregation)
-
AttributeSortItem
public AttributeSortItem(java.lang.String direction, java.lang.String attributeIdentifier)
-
AttributeSortItem
public AttributeSortItem(Direction direction, java.lang.String attributeIdentifier)
-
AttributeSortItem
public AttributeSortItem(Direction direction, java.lang.String attributeIdentifier, AttributeSortAggregation aggregation)
-
-