Exploring, modeling, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Sorting of Stack Bar

Reply
Occasional Contributor
Posts: 14

Sorting of Stack Bar

Is there a possibility to order the stack bars in descending order based on their height(i.e. highest to lowest) . Example as shown in the screenshot want the bar to be syncronised on the basis of their height from highest to lowest value. Please share the detailed steps if possible.

SAS Employee
Posts: 85

Re: Sorting of Stack Bar

Unfortunately not. Once you add a category to the group field, and set the chart to group the data, you loose the ability to sort by a measure.

-shawn

Grand Advisor
Posts: 10,223

Re: Sorting of Stack Bar

Since the screen shot isn't showing its a bit hard to see what you want. There are examples in the online help of using an Annotate dataset to create a simple barchart from scratch. Not slick but since you a sending the draw commands you can control the color of any given rectangle explicitly. Of course with this approach you have to do the same to get a legend. If you want to display stacks with the groups in different orders from one bar to the next this may be the general approach though.

Ask a Question
Discussion stats
  • 2 replies
  • 290 views
  • 0 likes
  • 3 in conversation