I have not found anything like this on the Internet, and it seems that the only way to sort data in a pie chart is to pre-sort. The problem is that I have a sheet filled with third-party software (Typeform) that contains random data, which I then collect for presentation in a pie chart.
In particular, Typeform writes
town | salary | cost
London | 1000 | 500
Bristol | 700 | 300
London | 900 | 400
Leeds | 600 | 200
Leeds | 500 | 300
Leeds | 400 | 200
Then I merge the data on another sheet (Sheet2) so that I have
town | occurrences
London 2
Bristol 1
Leeds 3
Obviously, a pie chart will draw first London, then Bristol, and then Leeds. These are only 3 entries, but in my example there are 20 entries and the data in the pie chart is not ordered.
Sheet2 , =UNIQUE(Sheet1!A2:A), =countif(Sheet1!A:A,A2), Sheet1, , , , , , .
( ) Sheet2 ?