Sorting a Vertical Stacked Column chart and Legend

Ryan Kearbey shared this question 3 months ago
Answered

Hello,

I would like to re-order the data and legend in a stacked column chart. My table looks like the following. What I'm trying to do is order the stacked chart to be in the data order descending.

/57db23a4175525dad9eca2ee1a22767e


However, when I go to my chart it's being put into alphabetical order based on the cause_name.

/69859f1c76a60bc79797f0cc28e9e090


I have these options enabled:

/436234fe71c12c681b8df833710e0ed4


/17cac4c30d6a410c7fef5727f7d4a4af


What I want to see is the Transfer Syntax Error at the top of the first bar, followed by Requested Service Option Not Subscribed, and so on. What am I doing wrong?

Comments (5)

photo
1

Hi Ryan,

Thanks for contacting Yellowfin with your question!

What you want to do is use Reference Code sorting, so that the sort order is defined in the code and then applied to the field. You can do that in the column formatting field in the Data tab of the Report Builder. For example, here Demographic is the stand in for your 'cause_name' field:

/1013a2af97f58d576ebbfb29c3f74b94

When you're setting it up for the first time you'll need to define the code by clicking Create New. You can then create the order and add specific colours if you wish:

/cfbb68b7b1c45523ba6ac69dce1ded47


And then choose to use reference code sorting on the chart:

/ea0a03afbabe62218d03b3ab58214e25

I hope that helps!

Kind regards,

Chris

photo
1

Thanks Chris. We will try it out.

Ryan

photo
1

No worries, let me know how it goes!


Kind regards,

Chris

photo
1

Hi Chris, you can close this ticket. Thanks!

photo
1

That's great to hear! Have an excellent weekend!