Enhancement: Ability to change display order of legend

Related products: None

As you can see in the screen shot, not having the ability to re-order the legend can make it pretty difficult to properly read a graph. If we could re-order the legend and have the order reflected in the graph as well it would make the data much more digestible.





I think one glance at the chart makes it easy to understand why the ability to do this would be helpful...

Hi Ray, it wasn't shown in your screen capture but I'm guessing this is a report with two fields in the "By:" area and while you can choose the sort order for the first field, the second field (which looks to be your score label) is not something that you can currently set. If we could allow you to set the sort order on the second field (so that your stacked bar chart reflected a more structured order of the score labels) would that meet your need?
Hi Dan,





Actually there was only 1 field in the "by:" area in this report (if that makes a difference). Created an MDA with a custom field to indicate which "bucket" an account fell into. To answer your question, yes. If we could somehow sort the order of the values in the "by:" area it would be a tremendous help/improvement to stacked bar graphs. 





We have other horizontal stacked bar graphs where we have custom fields to segment # of accounts by stages/states/progress/etc, so being able to look at these in a linear fashion (i.e. least -> greatest, earliest stage -> latest stage, etc.) would make interpretation MUCH more digestible if that functionality existed.
Hi Ray, we do offer the ability to sort the data in the chart - see below. 








This should give you the ability to sort ascending or descending based on any of the data represented on that visualization. 





Does this help with your use case? If not, could you share a larger screenshot of your report that shows the "Show me" and "By" areas (obscuring any sensitive info) so we can understand the data structure a bit closer? 
Hi Dan,





I'm familiar with sorting data, but im not trying to sort the actual data in the fashion which your depicting with your screen shot. To elaborate, the sorting you're showing me will sort based on the actual numerical data in the data set. I'm trying to order the meta data. For example, in the screen shot i originally posted, if you look at the legend you'll see the "buckets" in the following order:





1st - 51%-75%


2nd - 26%-50%


3rd - 100%


4th - 1%-25%


5th - 0%





You'll noticed the order in which they are displayed in the legend correlates with how they are ordered in the colored horizontal bar.





the CORRECT bucket display order should be:





1st - 0%


2nd - 1%-25%


3rd - 26%-50%


4th - 51%-75%


5th - 100%





From my understanding, there is no way to achieve my "correct" display order in both the legend and horizontal stacked bar. The sort method you provided sorts based on the Count associated with said "buckets", in other word sorts by the number of accounts that fall into these sub categories. Does this explanation better communicate what I'm trying to accomplish?





Another example would be custom stages. Let's say i had a data set where the y-axis was CSM's and x-axis is number of accounts stacked bar, the subsets of accounts are stages. I should be able to organize the stages in the legend in the chronological order in which they are to occur so as you interpret the horizontal stacked bar it makes more sense.
Thanks for sharing this additional detail, Ray. Could you share a larger screenshot of your report that shows the "Show me" and "By" areas (obscuring any sensitive info) so we can understand the data structure a bit closer? Seeing the full report might help us with recommendations and/or deeper understanding of the enhancement needed.





And the sorting allows you to sort both the represented data as well as the first field in the "By" area when you use the chart type you had in the original post. 





See examples below where I have two fields in the "By" area and a stacked bar chart. When selecting Chart Sorting, I can select the "CSM Name" field (the first field in the "By" area) or the "Total" values. 

















If I wanted to sort by Manager, I'd have to move that field to the first position in the "By" area to enable a sort by that data element. 
Dan,





There is something being lost in translation, from the examples you're providing it's becoming apparent you're not understanding my use case/what im trying to communicate to you. So let me just simplify this the easiest way i know how... here are 2 screenshots... i want you to answer the following questions...





1) In screenshot number 1, how can i sort the "bucket" field to read as follows:


1st - 0%


2nd - 1%-25%


3rd - 26%-50%


4th - 51%-75%


5th - 100%








2) In screenshot number 2 we're dealing with stages, chronologically the stages are as follows:


1st- Not Started


2nd - Scheduling


3rd - Scheduled


4th - In Progress


5th - Recommendations (not shown here as 0 accounts are in that stage)


6a - Complete


6b - Customer Declined





Same question, how can i customize the order of the 2nd "by" field, in this case "State"?








And just to clarify, the sorting im demonstrating in these screenshots has NOTHING to do with sorting the "TOTALS". I just want the ability to sort the display order in both the legend and the horizontal bars in a custom fashion, not by some predefined sort (i.e. alphabetical).





Does this finally make sense or do i need to explain further?
Hi Ray,





Thanks for posting the screenshots.





You threw me off a bit up above when you posted "[i]Actually there was only 1 field in the "by:" area in this report" as that type of visualization usually requires the format of one field in the "show me" and two fields in the "by". Thanks for confirming that you did have two fields in the "by" area.





As I mentioned in my first reply, "[i]while you can choose the sort order for the first field, the second field (which looks to be your score label) is not something that you can currently set." So to answer the two questions you posed in your last post, sorting by that second field in the "by" area is not supported.





It does sound like you've answered the question I asked earlier "If we could allow you to set the sort order on the second field (so that your stacked bar chart reflected a more structured order of the score labels) would that meet your need?" with a yes.  





🙂
So yes and no. Just to clarify, even if i had only 1 "by" field i can still only sort by TOTALS (ascending and descending). Gainsight does not support the sorting i'm referring to even with just 1 "by" field. Assume i removed the "CSA by field" in the 2nd screenshot. I still can't rearrange the order of the field values on the y-axis in a customized fashion.





So even if you expanded the same sorting functionality to the second "by" field, my ask would not be addressed. 



So looks like you are calling out two separate issues:


1 - "[i]even if i had only 1 "by" field i can still only sort by TOTALS (ascending and descending)"


2 - "[i]rearrange the order of the field values on the y-axis in a customized fashion."





On topic 1 - you can sort by both the totals and the label (ascending or descending). See examples below:





Sorted by count, ascending:








Sorted by field name, ascending:








On topic 2, looks like what you're looking for is similar to how Excel does custom sorting: https://www.gcflearnfree.org/excel2013/sorting-data/2/ That is an awesome feature and not something we currently have. I've converted this thread to an Idea and tagged the product manager for reporting so he can track this request. 





In the meantime, one workaround is to prefix the data with a number that would indicate the sort order (as was done in the second example above). 





Thanks for the great discussion topic and for being active on community, Ray! Have a great day!