I am relatively new to AGOL and dashboards, and I have encountered an issue I haven't been able to solve. Here’s the situation:
We are working on a traffic crash dashboard with two serial charts that we want to combine into a single chart. The two charts were created using the same layer/attribute table.
The first chart displays the number of fatal crashes per year. This chart is a count of the records in the attribute table (each record represents one fatal crash).
The second chart displays the number of fatalities per year (i.e., the total number of people killed in the fatal crashes). This chart is the sum of the fatalities field of the same attribute table.
The vast majority of our fatal crashes have one fatality, but a few have two or three. Thus, in a typical year, we may have 30 fatal crashes with 34 fatalities. Because the number of fatal crashes and the number of fatalities are always relatively close to each other, we would prefer to show the data in a single serial chart – perhaps using bars for the number of crashes per year, and a line for the number of fatalities per year.
Can this be done?
Hi @MWH Not sure if you found an answer to this but you could try the following:
1. Add a new Serial Chart element.
2. Choose your fatal crash layer as the data source.
3. Set the Category Field to your year field (e.g., CrashYear)
4. Under Series, click Add.
5. Choose:
• Statistic: Count
• Field: (leave blank — count uses record count)
6. Style it as bars (this will represent number of crashes).
7. Click Add Series again.
8. Choose:
• Statistic: Sum
• Field: your fatalities field (e.g., )
9. Style this series as a line.
This gives you:
• Bars = number of fatal crashes
• Line = total fatalities
Both plotted by year.
It is optional but you could use the secondary y-axis
Turn on Secondary Axis for the fatalities line (found under the series styling options)
This keeps the chart readable if the values diverge in some years.
Daniel, sorry for the delay in responding, but I've been out of the office for the holidays. I will give your solution a try and let you know how it works. In the meantime, thank you very much for your input.