Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 182255

Summary: Ability to sort X axis based on Y axis values
Product: z_Archived Reporter: John Ward <johnw>
Component: BIRTAssignee: Heng Li <liheeng>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: lshen, vgryn
Version: 2.2.0   
Target Milestone: 2.3.0 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Ward CLA 2007-04-12 22:10:24 EDT
Had a report developer ask me if this was possible in the chart engine directly. Basically they wanted the ability to have the X axis sorted based on the ascending/descending values of the Y axis. For example, if you had the following data entries...

a = 2
b = 1
c = 5
d = 4
e = 3

where a,b,c,d,e are the X axis, they would want the X axis to be displayed in the following order ascending (b, a, e, d, c). This would allow line graphes and bar charts to show an upward trend for Top N reports. Currently, you can only sort by X axis.

The workaround suggested was to sort in an outter table and embed the chart inside with the sorted results. However, this would be a nice enhancement to the chart engine directly.
Comment 1 David Michonneau CLA 2007-04-17 13:19:11 EDT
This is not supported yet. However they are two other possible workarounds:
1- sort the data in your SQL query
2- sort the data in the sorting tab (property editor view) for the chart
Comment 2 Heng Li CLA 2007-11-27 23:17:25 EST
Added SortKey tag in SeriesDefinition to store optional X axis sorting expression.
Comment 3 David Michonneau CLA 2007-12-04 11:45:37 EST
*** Bug 170308 has been marked as a duplicate of this bug. ***
Comment 4 Heng Li CLA 2007-12-10 00:58:01 EST
Reopen it to disable SortKey selection for Y grouping enabled case.
Comment 5 Heng Li CLA 2007-12-10 01:03:32 EST
Disable SortKey selection of base series for Y grouping enabled case in the UI, currently we only implemented simple SortKey on base series.
Comment 6 Maggie Shen CLA 2007-12-27 02:21:29 EST
verified on build 2.3.0 v20071227-0800.