Include totals in stacked column chart

Is there any simple way to include totals in a stacked column graph? This is from the Numbers template and I've included values



Ideally I'd like to have numbers 12, 18, etc. above the columns. I've tried this by adding a totals column to the table but that just includes the totals as yet another category.


Thanks,

John


Posted on May 31, 2020 2:19 PM

Reply
Question marked as Top-ranking reply

Posted on May 31, 2020 7:15 PM

Hi John,


Will this work?

How it's done:


The chart is actually two charts, stacked one in front of the other.


I didn't take the time to make the alignment perfect, as can be seen at the top pf the Item 1 column, and th base of all columns.

(After inserting the image here, I used Arrange > Align > Top (after selecting the main areas of both charts) to bring them into better alignment.)


In your data table, add one column to hold the totals


Make the first chart as you have done, selecting columns B and C to supply data for the two stacked bars for each item.


For the second chart, I used a stacked bar chart, even though there'd be only one data series. The main reason for my choice was to get the same colour set for the bars in both charts.




After producing the second chart, go through the Chart Inspector and set all displayed items (except the bars themselves, and Values to be displayed on the bars) to 'none'.


Your final result (except for the lack of gradient shading in the bars and width of the bars) should look like this:


Click on one of the bars to select them, then, in the Inspector, choose Chart, scroll down to Gaps and set Between columns to 150%. (Do this in the main chart as well, as the values printed on the bars are aligned to the verticl centre line of the bars.)


With both charts now ready, Select the totals one, and use Arrange > Bring to Front to ensure that it is in a layer above the o

original chart.


Use the mouse/trackpad or the arrow keys (with shift down for greater speed, shift up for smaller steps and easier precision), slide the new chart onto the original, aligning top and bottoms of each column, and shifting the new chart to the right to expose both columns for each item.


Regards,

Barry

Similar questions

2 replies
Question marked as Top-ranking reply

May 31, 2020 7:15 PM in response to Mataglap

Hi John,


Will this work?

How it's done:


The chart is actually two charts, stacked one in front of the other.


I didn't take the time to make the alignment perfect, as can be seen at the top pf the Item 1 column, and th base of all columns.

(After inserting the image here, I used Arrange > Align > Top (after selecting the main areas of both charts) to bring them into better alignment.)


In your data table, add one column to hold the totals


Make the first chart as you have done, selecting columns B and C to supply data for the two stacked bars for each item.


For the second chart, I used a stacked bar chart, even though there'd be only one data series. The main reason for my choice was to get the same colour set for the bars in both charts.




After producing the second chart, go through the Chart Inspector and set all displayed items (except the bars themselves, and Values to be displayed on the bars) to 'none'.


Your final result (except for the lack of gradient shading in the bars and width of the bars) should look like this:


Click on one of the bars to select them, then, in the Inspector, choose Chart, scroll down to Gaps and set Between columns to 150%. (Do this in the main chart as well, as the values printed on the bars are aligned to the verticl centre line of the bars.)


With both charts now ready, Select the totals one, and use Arrange > Bring to Front to ensure that it is in a layer above the o

original chart.


Use the mouse/trackpad or the arrow keys (with shift down for greater speed, shift up for smaller steps and easier precision), slide the new chart onto the original, aligning top and bottoms of each column, and shifting the new chart to the right to expose both columns for each item.


Regards,

Barry

Jun 2, 2020 6:35 PM in response to Mataglap

EDIT: I did not see Barry's post before writing this up. It is generally the same idea, but not exactly.


I don't know about simple but you can do it with two charts overlaid on each other. It looks like a lot of steps but it is not that hard to do. I recommend being completely done formatting your original chart before making this overlaid chart.


  1. Add a column to your table that has the totals
  2. Create a bar chart of that column
  3. Select a bar and give the bars value labels
  4. Select a value label and change its color to something other than white.
  5. Set the value label location to be "outside". (If they had still been white, they would look like they disappeared, which is why we changed the color first)
  6. Format both charts so the Y axis min and max are actual values, not automatic. Both charts need the same min and max.
  7. Make the chart exactly the same size as your other chart.
  8. Slide the new chart over your original chart and adjust it so it is the same size and in alignment with it.
  9. On the new chart, remove all formatting. No gridlines, no axis line, no legend, no strokes, no labels on X or Y axes, and set the bar color to 0% opacity (which you do using the color wheel, not selecting from the default palette of colors). All that should be left of that chart is the value labels.


If you want to make format changes to the original chart, you can slide this cover chart away from it so you can select the chart underneath.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Include totals in stacked column chart

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.