How to dynamically sort bar chart category axis based on user input list

I would like to find a way to sort a bar chart based on a user input list but I haven't found an elegant way to do this.

I have an attached example file. In the text seciton, I have a multi line input property where I users can enter a list of IDs that can be used to sort the category axis of the bar chart. If nothing is entered, I would like the default sort by value.

Can you give me some direction in completing this with an IronPython script?

Thank you for your help!



Binary Data examplefileforbarchartsorting.dxp191.75 KB

(1) Answer