While working with a stacked bar chart in SQL Server Reporting Services (SSRS), I needed to change the sort order for the legend without changing the sort order of the stacked bar. Despite the fact I personally think stacked bar charts are a poor way to visualize data people still want to use them. Didn't they read my post on charting best practices?!? One of the tricks with a stacked bar chart is that only the bottom value can actually be measured. Thus, we frequently want to force the most important measure to sort to the bottom of the stacked bar. Uh oh! Once you sort the most important measure to the bottom of the stacked bar, the legend will now be sorted with the most important measure on the far right, most likely where the least important value would be described. I was starting to think it wasn't going to be possible to correct this annoyance until I stumbled on a clue in a thread on another site (On SSRS 2008, Why Is The Legend Sorted In Reverse Order?) Most of the suggestions didn't actually change the sort order of the legend without changing the sort order on the chart (again, stacked bar for my example). Buried among the suggestions which didn't work were a few sentences, apparently from Sean Boon of the SSRS Team (Boon Blog), which did the trick.
Instead of right clicking on the legend and looking at the "Legend Properties" as Continue reading




