How to sort legend by name

Hi,
I am currently using Grafana 8.5.20 and have a doughnut visualisation with a legend. Currently the legend is sorted by value (like you can see in the screenshot). But I would like to sort it by name. So that the order would be <3, 4-6, 7-10, >10, n/a. Does anyone have an idea how to achive that?

Kind regards,
Screenshot 2023-12-27 095336

I´m also curious about the answer. I stumbled over the same issue.