8 – Order results by number of votes

I want to display the results after voting by the number of votes (DEC), instead of the default order which is the same as the questions. This would be very useful for UI purposes. This seems to me very obvious request, but haven’t found something similar.

I made two attempts:

  1. creating a poll view displaying the choice field, with the choice target sort criteria. Unfortunately it doesn’t sort them accordingly.

  2. after this, I can only think sorting the results by modifying the module where it prints the <dl> {{ results }} </dl> in the poll-results.html.twig, but I’m not sure where the var is created.

Any help would be apreciated.