Sorting Columns on X-Axis E.g. Displaying Month Name
If you need to rename the labels to something that does not exist on the database then the instructions below show how axis labels can be overridden.
If an Optional Y Series Grouping is added to a Report then whatever is displayed on the X-Axis is automatically defaulted in as the Sort Order. This means that if the X-Axis is displaying Month Names then they will be sorted alphabetically, which is incorrect.
Please follow these steps to resolve the problem:
- Put the month number on the x-axis.
- Sort it in Ascending order.
- On the Layout tab highlight the chart and click the Script tab
- Select the beforeDrawAxisLabel function
- See this URL for sample code:
http://www.birt-exchange.org/org/forum/index.php/topic/ 10988-changing-x-axis-labels-only/