Auto rearrangement of queries in graph panels ( with multiple queries/targets)


I would like to implement the following feature: Auto rearrangement (sorting) of queries in stacked graph panels (with multiple queries/targets) based on the values obtained from legends/aggregations. If this can be done, kindly suggest me some implementation procedures. Thanks in advance.
Auto-addition of queries based on metrics names/patterns in a graph panel, can be added to this feature may lead to an excellent feature in monitoring automation.

Example :

In this example with multiple queries/targets, the stacked graphs had been sorted based on the average values obtained to have a better visualization.



Let me see if I understand your question. You would like to be able to sort the series names column, i.e. A, B, C, D ascending or D, C, B, A descending just like you’ve did with the Current column?

As you may know the stacked graphs are re-rendered and ordered when you sort on the columns in the table. So if you click on Current a couple times you’ll see that you’ll hit a state where there’s no sorting arrow - In this case I think that the graphs should order by series name ascending.

Please try this out and let me know if that works