Hi team - i am looking to change the sort order of...
# gooddata-cloud
j
Hi team - i am looking to change the sort order of data in stacked bar charts and have the legend match the sorting. probably something simple i overlooked, can it be done? right now they are sorted by numerical value, but id like to sort on spend.
m
j
Hi Michael - so I am able to sort the x and y axes, but what I am trying to do is sort the stacking per bar, not the entire graph. For example, I have a chart that shows dates in order on the x axis, and dollars spent on the y axis. the bars are stacked by service. i do not wish to change the sorting of the axes themselves, but rather how the services are stacked in each bar. right now they are either alphabetical or numerical order (depending on the data given - in this case alphabetically) but I would like to change the stack order if that's possible
j
Hi, the stacked bars are odered by order of attribute (“service” in your case) and items in the legend follow the same order. It helps readibility of charts. The order of values of attribute can be customized in data model. You can add column to dimension dataset, which contains attribute values and set it as “sort label”. For example you can use values 1,2,3 in this extra column for priorities High, Medium, Low if this is the desired order. GoodData then uses this extra column for sorting of the values which are displayed.
j
ah I see, okay thank you for the information folks
p
🎉 New note created.