Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reordering the legend

Is there a way to reverse the order of the legend on a bar chart? When using Stacked bars, my boss would like it to follow the same Top Down order of the stack. I'm using Sense Desktop.

Thanks

19 Replies
NZFei
Partner - Specialist
Partner - Specialist

Can't you do that in the property -> sort?

Not applicable
Author

In the Sorting section of properties, I can sort by dragging the 'measures' but that also reorders the Bar stack and leaves me with the same issue.

NZFei
Partner - Specialist
Partner - Specialist

Sort by dimension, uncheck "Auto" sorting, check "Sort by expression", then make the expression descending sorted like this:

Not applicable
Author

That seems to only sort the Bars, and not the stack within the bars.

Not applicable
Author

Does anyone know of any extensions that deal with the Legend? Maybe my answer lies in there somewhere.

Anonymous
Not applicable
Author

No can do, out of the box, as far as I am aware.

You could write an extension, but unless you have extension writing skills that may not be a viable option.  Not aware of any suitable open source extensions but worthwhile checking out Qlik Branch

shraddha_g
Partner - Master III
Partner - Master III

apply sorting expression to 2nd dimension which is forming stack

priyasawant
Creator II
Creator II

Hi if you want to reorder the legends we cant sort it directly, so kindly create a Inline table of the dimensions you want to sort giving it a serial number and in sort kindly select sort by Expression and call that field in it. Go through the below images and try the same


Tab1:

Load * Inline [

CustomerName, Sr.No.

Ravi, 1

Kumar, 2

rajesh, 3

kamal, 4

Suresh, 5

];

and in the chart go to sort and select sort by expression

Sort.PNG

Not applicable
Author

Hi Priyanka

I can't figure out how or where to add the Inline Table. Can you point me in the right direction?

EDIT:

Ok I figured out how to add an Inline Table. Now I just need to figure out how to use it.