public class AttributeSortItem extends Object implements SortItem
With "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 AttributeSortAggregation
Simple 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 and Description |
|---|
AttributeSortItem(Direction direction,
String attributeIdentifier) |
AttributeSortItem(Direction direction,
String attributeIdentifier,
AttributeSortAggregation aggregation) |
AttributeSortItem(String direction,
String attributeIdentifier) |
AttributeSortItem(String direction,
String attributeIdentifier,
String aggregation) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAggregation() |
String |
getAttributeIdentifier() |
String |
getDirection() |
String |
toString() |
Copyright © 2019. All rights reserved.