Select to view content in your preferred language

How can I sort a stacked chart and add labels at the end of each bar in ArcGIS Dashboards?

561
3
10-16-2024 01:53 PM
Labels (1)
JoseBarrios1
Frequent Contributor

Hi everyone,

I'm looking for suggestions on how to sort a stacked chart by the total count and display the y-axis from the highest to the lowest. Additionally, I'd like to add a label showing the total count at the end of each bar (see attached pic). I realize this might not be directly possible in Dashboards, but I'm wondering if anyone has any workarounds or tips to address this limitation.

Thanks in advance for any suggestions!

JB

 

chart.png

 

0 Kudos
3 Replies
clt_cabq
Frequent Contributor

replying to follow mostly because I don't think you can actually do this, but if someone knows how I'd love to see that solution because I've wanted to do this kind of thing a lot. 

Edit: the closest I have come to achieving this is to have another series that represents the total that you want to see at the end of your stacked bars, then show that as a line with points instead of a column - you can mess around with things like turning the line to 0 opacity so it doesn't show up. It still doesn't render as nicely as I'd like but this "sort of" will work. 

0 Kudos
JoseBarrios1
Frequent Contributor

Hi clt_cabq,

The only way I could get a closer look was by creating a new field and adding a number to the taxa group label based on their total value ( see pic). This could work if your data doesn’t change, but in my case, I’d have to relabel every group each time the count changes. I also think that the labels at the end of the bar is not possible!

JBchar_creenshot 2024-10-16 172459.png

 

0 Kudos
clt_cabq
Frequent Contributor

here's an example of the approach I was suggesting - this is for shelters and shows the occupied and available (unoccupied) beds stacked, with another field for total beds for each facility as a line overlaid... it has the advantage of showing what is essentially the sum of the two stacked categories and updates. However, there are no good controls over where the label draws or color or anything. In the configuration of the series for the total beds field I've dropped the line opacity to 0 so it doesn't draw, and you can choose to change the color of the line and data points, and the size of the point. It works, just not very elegantly.

clt_cabq_0-1729172077828.png