Page History
Page properties | ||
---|---|---|
| ||
UI Text Box | ||||
---|---|---|---|---|
| ||||
The chart results on the axes are always sorted by name. To change this behavior in scripted charts, it's possible to add a custom Comparator to the result. |
UI Text Box | ||
---|---|---|
| ||
All provided group collectors use the standard Jira sorting method. E.g. Custom Field options are sorted by standard ordering. Statuses, priorities, and resolutions appear in the order they were sorted in the Jira Issues configuration. |
UI Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
The x-axis can be sorted by calling the method metaCountGroup.orderX(Comparator comparator); In most cases, it might be enough to use the Comparator provided by the groupValueExtractor.getComparator(). Here is one example of sorting groups on the x-axis. The values on the x-axis are the issues statuses:
|
UI Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
To sort the groups on the y axis requires this to be the last operation before data is transmitted to the chart builder or to create a new object. This is necessary because the method returns a new sorted object and does NOT sort the current object itself. The method to call is metaCountGroup.getOrdered(Comparator comparator); Here is an example of how to sort the y-axis:
|
UI Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
To reverse the ordering of an axis, call comparator.reversed() In code this should look like the following example:
|
UI Expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
It is possible to write a complete new Comparator e.g. to sort Strings by a leading number. Therefore it is necessary to write the comparator, then call the ordering functions and use a new instance of the custom comparator as a parameter. The following example shows the implementation of the comparator and how to use it:
|
UI Expand | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
In some cases, it can be useful to order the groups by related objects instead of string comparison. The standard GroupValueExtractor Comparator compares the related objects. To use a custom complex comparator the following steps are required:
|
Related examples
Page properties report | ||
---|---|---|
|
Excerpt Include | ||||||
---|---|---|---|---|---|---|
|