Re-order categories in Serial Charts

10201
27
06-10-2019 02:39 PM
GeeFernando
Occasional Contributor

I'd love for Ops Dashboard to have the ability to re-order categories in Serial Charts?

Currently, we're able to sort categories. But, unable to categorise them manually.

Thanks,

Gee

27 Comments
NeilWebber

Hi, just to add to the weight of requests on this enhancement.

The ability to manually sort categories, and the order of stacking in a stacked chart is so essential to my particular use-cases that the Serial chart widget is almost useless without it.

I understand that the category sorting can be overcome by some careful data preparation beforehand, which is OK but not ideal, but I've never found a way to cause the stack order to be anything other than random.  As far as I can tell there's nothing to change in the underlying json in the AGOL Assistant that deals with this, and the seeming randomness of the stack order is enormously frustrating.

E.g. if I create two comparison stacked charts that are different categories but split by the same field (say counts of animal types split by species for Year 1 and Year2), the fact that the stacking order of the species is random and usually different across the charts renders any visual comparison meaningless - and the whole purpose of the chart widget is as a visual aid (I think?).

Anyway, the move to 'Under consideration' is promising - I hope that the stacking issue is part of the roadmap.

And, just as an afterthought, does anyone have any idea what does control the stacking order?

emilyblackburn
I believe its whatever happens in your first break.
So that if I have day of week split by Hour, if Monday's first hour is 15, then 15 is ALWAYS first in that rendition of the chart. But if Monday has NO COUNTS in hour 15, but does in 16, then all days of week start with 16, and 15 shows up at the end. So that the hours are out of order.


DanteLee

As a workaround, I was able to manipulate this in the JSON through AGO Assistant (https://ago-assistant.esri.com). I know digging into code isn't for everyone, but in case you're bold enough 😉

DanteLee_0-1616520663979.png

 

Mike_Koutnik

Wow. Great prompt by DanteLee.  That inspired me to attempt JSON editing for a different case.  Each feature (habitat project) can have multiple values for ecological type.  To keep the feature class simple, and flat, we simply have a field for each type, and insert a 1 into the field if the feature has that ecological type.  Then, we can count the number of instances of each type to see the overall representation of ecological types across all projects.  So there isn't anything in the data to sort by.  BUT, I was able to go into the JSON and simply change the order in which the sums for each field are presented.  For instance:

Here is a snippet of the original JSON:

...
{
"onStatisticField": "Island",
"outStatisticFieldName": "Island",
"statisticType": "sum"
},
{
"onStatisticField": "InlandPlant",
"outStatisticFieldName": "InlandPlant",
"statisticType": "sum"
},
...

I simply changed that code to:

{
"onStatisticField": "InlandPlant",
"outStatisticFieldName": "InlandPlant",
"statisticType": "sum"
},
{
"onStatisticField": "Island",
"outStatisticFieldName": "Island",
"statisticType": "sum"
},

Very easy and quick.

 

BertKraan

Indeed, coding isn't for everybody. I would strongly emphasize to add this feature.

In the DIY GeoApps mooc students use a survey with a likert like:

strongly disagree - disagree - neutral - agree - strongly agree

but currently there is no way of telling how the resulting series in the dashboard will be ordered.

JanHavlas

We are facing the same issue daily. It makes the Grouped Values option in Serial Chart almost useless. Unless we bring in 100% cleaned-up data (and for some it doesn´t work anyway as commenters above already stressed) the is no way to correctly re-order the stacked categories in the serial chart. I would consider this to be a critical addition to the Operations Dashboards.

GarrettMelvin

Adding comment and use case to help emphasize the importance of a sort option.  We generate a new dashboard twice daily to accompany our vehicle fleet schedules.  The serial chart is a stacked bar chart that summarizes the total quantity of each product type required to load by hour.  This helps our staff at the domicile ensure the product is ready when the next vehicle arrives for pickup.  We would like to sort the stacked bars by product name, but our naming convention limits using ascending or descending sorts.  

 

GarrettMelvin_0-1624636966972.png

 

BrianGallegos

@DanteLee, you're my savior!  This should be an easy thing to do in the UI, but I'm glad I found this workaround.

TimLohnes1

Have to add on that I can't comprehend that there is no standard way to organize chart in a logical order. Right now you can just make a chart that confuses people and/or makes no sense. Or you have to add fields and workarounds.

I just don't understand why making charts that make sense isn't a standard feature. The standard feature is making charts that DO NOT make sense. That is weird.

LeilaJackson1

@ESRI Is there any update on this? It is really necessary to be able to sort categories in a logical way which may not just be ascending or descending.