A stacked chart breaks down each bar or column in a chart into subsections of the total. For example, if you've created a column chart displaying tickets by the year in which they were solved, you could further break each column down by the ticket satisfaction rating. This can be particularly useful when you want to see a visual representation of which items are having the most influence on a category total.
The following chart types support using stacked values:
In this article, you'll work through an example of creating a column chart showing ticket satisfaction ratings on a year-by-year basis. You'll then use stacking to make the chart easier to read. Finally, you'll be introduced to some of the options you can use to refine stacked charts.
This article contains the following topics:
Creating a stacked chart
In this example, you'll create a column chart that shows ticket satisfaction ratings on a year-by-year basis. You'll then use stacking to enhance the readability of the chart.
To create the stacked chart
- In Explore, click the Queries ( ) icon.
- In the Reports library, click New report.
- On the Select a dataset page, choose the dataset containing the ticket data you'll need to build the report; in this case Support - Tickets, then click Start report.
- Next, in the report builder, add your metrics, the things you want to measure; in this case, the number of tickets created. In the Metrics panel, click Add.
- From the list of metrics, choose Tickets > Tickets, then click
Explore displays the number of tickets in your Zendesk Support instance.
- In the Columns panel, click Add.
- From the list of attributes, choose Time - Ticket solved > Ticket
solved - Year, then click Apply.
Explore displays the number of tickets broken down by the year in which they were solved. If the chart is not displayed as a column chart, you can change this from the visualization type menu ( ).
- In the Rows panel, click Add.
- From the list of attributes, choose Customer satisfaction > Ticket
satisfaction rating, then click Apply.
Explore displays the number of tickets broken down by year. Using the row selector, you can select which ticket satisfaction rating to display though often, you'll click the row selector heading to select all rows. Each rating type displays as a separate column on the chart. Next, group these rating columns together to create a cleaner looking stacked column chart.
- From the Chart configuration menu ( ) , click Chart.
- From the Chart panel, select Stacked. Make sure the other options
on this panel are not selected.Note: To find out more about the other stacking options, see Advanced settings for stacked charts in this article.
- In the row selector, select the ratings you want to appear in the stacked chart
or click the heading, in this case Ticket satisfaction rating, to select
all the ratings.
Explore redisplays the column chart with the satisfaction ratings stacked together for the selected rows.
Advanced settings for stacked charts
Use the chart panel in the Chart configuration menu ( ) to access stacking options for area, column, and bar charts.
This menu contains the following options for stacking your chart:
- Stacked: Turns stacking on or off. Hover over one of the bars in the stack to see the total number for that bar.
- Stacked: Aggregate values: Starting from the first bar, the values of subsequent bars are cumulatively added together. The final bar displays the total of all bars.
- Stacked: Percentage: Displays the percentage of the total for each stacked bar. In addition to selecting this option, you must configure the Show value option on the Displayed values panel of the Chart configuration menu to Show.
- Stacked: Show total values: Displays the total from each bar at the top of the stack.
Is there anyway to show the total value above the bars without stacking them?
Hi Darren Taylor! There is definitely a way to do this. You'll want to open the configuration menu and select "Display Values" and click the box at the very top to change it to "Show". It looks like this:
Perfect, thank you @...
Hello! I am trying to get the chart to stack but I am not able to. I included screenshots below. Can you please see if I am setting anything up incorrectly? I want our type of checks to all show on the same graph instead of the separate sheets.
Hi LaReine Pia, you will see it stacked if you click on the attribute title of Type of Check, the above shows you are only looking at Manual Check. You may want to scroll through the above comments for other hints as I had a similar question. Hope that helps.
Is there a way to have stacked bars for multiple attributes? When adding the extra metric it is just making one huge stacked bar (second picture) instead of two side by side as desired (example in first picture)
I'm afraid there's no option to separate the two metrics into two bars in a stacked chart. If you select Stacked in your chat configuration, the metrics sliced by the row attribute will be stacked into a single column. Sorry about this, Adam.
Is there a way to do a stacked 100% chart? Where instead of seeing the total number you see the columns as a percentage to total?
Week 1, A 50% of total B 50% of total
Week 2, A 60% of total B 40% of total
The goal would be to show relative percentages over time. Please view this article: https://exceljet.net/chart-type/100-stacked-column-chart
I have already tried stacked percentages, that is not the functionality I am looking for.
You can try displaying the data first in a table as percentages via Result manipulation → Result path calculation, with the following parameters.
You can then switch the visualization type to Columns and display it as stacked. The chart should be shown as stacked percentage values.
I'm after the same functionality as Nicole I think but struggling.
This is my table with values:
I want to display the percentage totals of those values against each row. So if we take December, we can see we have 51 + 66 tickets in total (117). I want display the two numbers as percentage totals of 117. When I set the Result Path Calculation to '% of Total' and 'On Rows', Explore calculates each entry as a percentage against the total number of results in my entire query, leaving me with this (which tells me nothing):
It's driving me round the bend but I'm sure I'm missing something really obvious!
From your screenshot and based on your description, it sounds like the result path is based on whole result of the table. Can you check again the path selection? If you need the percentage displayed to be based on the total of the values for each column (example, for December row, 51/117 and 66/117) then Path must be set to On columns. Here's a sample:
Is there a way to sort the stacked elements by quantity? E.g. highest value in column is on the bottom, smallest value on the top
The very question I wanted to ask Ben Wright.
I have tested it thoroughly on the Stacked Columns. As it turns out, sorting results is only available in Table Visualization. I'd recommend creating a Community post separately for that with your use case to help get more visibility and votes on the idea. Then, others can share their use cases to further drive demand for that feature.
I hope this answered your inquiry.
is it possible to insert the second decimal place to percentage of the stacked chart?
Please sign in to leave a comment.