Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following pie chart that I want to sort the legend order.
I also have this table in my script which might help with custom sorting. I don't know how to implement it though.
[Reason Codes]:
Load * Inline [
Reason Code, Reason Code Number
Recut: Fabric Quality, 1
Remnant, 2
Spread Loss, 3
Recut: Human Mistakes, 4
Unaccount, 5
];
I tried Sort by function, and then use Pick/ Match([Reason Code]) or Pick/ Match([Reason Code Number]) but it didn't work.
Can you share the script for custom order you wrote in Sorting?
Respect to the data provided by you.
Go to sorting tab > Turn off Auto > Select sort by expression > Select Ascending order > Then add the below expression:
Try this once,
Pick(Match ([Reason Code], 'Recut: Fabric Quality','Remnant','Spread Loss','Recut: Human Mistakes',
'Unaccount'
)
,1,2,3,4,5
)
Hi, I tried your script but it only changed the order of the segments in the pie chart, but I want to change the order of the legends on the right.