Hello draycut, hello RW9, thanks for the help, It unfortunately didn't work with your suggestions, I probably might have made a mistake some where in the code but I finally found a very easy way to solve the problem. the issue is that I wanted to sort the listed items in my keylegend. Not using ascending or descending order as used in Sortorder (the Keylegend Statement). I solved the problem this way: since I have set the order already in my attrmap while assigning colors to the bars. I just added an extra column to my attrmap which is Show = "Attrmap" this displays the legend items in the order which is defined in the Attrmap for a example if you assign colors this way using attrmap data attrmap; input id $ value $10. @19 fillcolor $8. show $10.; datalines; flavor Vanilla beige attrmap flavor Chocolate cx663D29 attrmap flavor Strawberry pink attrmap ; run; this will display the items in your legend in this order vanilla, Chocolate, Strawberry
... View more