The z-order of marks in Tableau is not a simple process. It is not just the shape shelf, or the just the color shelf that determines the z-order of the marks, but all shelves on the Marks card (including Level of Detail, and the order of the measures in a dual axis), In your situation, the sort is being affected by the pill on the Label shelf, remove the pill from the Label shelf, and you will get the sort that you want.
It sure would be nice if this was documented, so far, the best I have is trial and error for the z-order of marks. I suspect this is something built into VizQL.
Joe thanks a lot for the insights. I was unable to sacrifice the pill on the Label shelf, but since you identified the Label shelf as the problem, I did a bit of trail & error and found that doing a sort on this pill popped the heart to the top. Here was the sort:
I have no clue why it works, but for now I'm just glad you helped me make my deadline. Thanks again,
PS: Yes, a bit more documentation sure would help. Along with commands for 'send to back' 'bring to front' etc.
Shawn, from what I can tell, z-order in Tableau is not like other applications where they have commands for 'send to back' 'bring to front'. In Tableau the z-order is determined by the data, not a property. I would not expect to see commands like that in Tableau, from what I can tell in Tableau if you want to change the z-order of your marks, you would need to change your data, just as you did here.
Yes I suspect you're right. It's hard not wanting Tableau to be more 'graphic' driven (or at least oriented), but I understand why data has to remain the primary driver. The work-arounds can get a bit tedious, but there's usually a way to get close to what you're trying to do.
I'm having a similar issue in trying to show some marks in front of others on an area chart. In your above comment you mentioned that the underlying data would need to be changed. Can you comment on what exactly needs to be changed?