Fetch top 5 cities by sales revenue to show in chart

I have made a sales app, where I have a column of “City” from which order is placed. Now I want to show these cities in a Pie chart, but only top 5 or top 10…NOT all. Can anyone suggest a way how to do this … ?

Use in app sort by amount, and then limit number of showing items, or in Google sheets use function sort+filter, add arrayformula(row()) then in glide filter rows that are lesser than 6