How to make number appear at top of bar chart

This is the only video you need to learn how to add add totals to stacked bar charts and stacked column charts in Excel. Make sure to watch the video because I have you covered both ways.

I’m more of a video explanation person, so make sure to watch the video so the steps are clearer. Then refer to the bulleted steps as reference once you have the initial basic understanding.

How to make number appear at top of bar chart

The Keys to Adding Totals to the Stacked Column Chart Above:

  • Add a “Grand Total” column to your data
  • Highlight your data not including the “Grand Total” column
  • On the “Insert” menu select a “2-D Stacked Column” chart
  • Select “Switch Row/Column” as necessary so your first data column is listed on the X axis
  • Select the chart and then expand the data range to include the “Grand Total” column
    • Add “Data Labels” to the Grand Total series on the chart
  • Right click on the Grand Total and “Change Series Chart Type”, the viz becomes a “Combo” chart
  • Change the “Grand Total” series chart type to a “Line”, while leaving all others as a “Stacked Column”
  • Format the line’s data label, changing the Label Position to “Above”
  • Select the line, format the data series and change the “Line” option to “No Line” in order to leave only the totals and hide the line.

How to make number appear at top of bar chart

The Keys to Adding Totals to the Stacked Bar Chart Above:

  • Add both “Grand Total” and “Spacing” columns to your data
    • Highlight your data including the “Spacing” column but not including the “Grand Total” column
      • The “Spacing” column should have a value of 0 at this point
    • On the “Insert” menu select a “2-D Stacked Bar Chart”
    • Select “Switch Row/Column” as necessary so the “Spacing” values are not listed as an option on the Y axis
    • Change the “Spacing” column values to a number (e.g., 1000) big enough to make a new category visible on the stacked bar chart
    • Right click to “Format Data Labels” and change the “Label Options” to “Value from Cells”
      • In the “Select Data Label Range” pop up box, highlight the values from the “Grand Total” column
      • Change the “Label Position” to “Inside Base”
    • On the chart select the Grand Total Series and right click so the “Fill” option appears
      • Change the “Fill” to “No Fill”
    • Change the values in the “Spacing” column to 0
    • Delete the “Grand Total” entry from the Legend

You can thank me by liking and subscribing to my YouTube Channel

All views and opinions are solely my own and do NOT necessarily reflect those of my employer.

Do Great Things with Your Data – Anthony B. Smoak

► shop.spreadshirt.com/AnthonySmoak

This should work in most recent releases. If it does not work in your release (since you did not specify that, I have no idea what it is), there are other options that will work. For the present, see the bar documentation section on for details.

.

More Answers (2)

How to make number appear at top of bar chart

Edited: MarKf on 22 Oct 2022

Something like this?

Edit: ah, too slow. Though this very basic approach might work with earlier releases too. You could get() the x coords for the text from the bar handle too

components = {'First Design', 'Second Design', 'Third Design'};

x = [66.5 33.5; 68.7 31.3; 64.9 35.1];

xlabel ('Design Name','fontweight','bold','FontSize',12);

ylabel ('Penetration Level (%)','fontweight','bold','FontSize',12);

text(ri+(-0.15+0.3*(ci-1)),x(ri,ci)+ybuff,num2str(x(ri,ci),'%0.0f%%'),...

'HorizontalAlignment','center',...

'VerticalAlignment','bottom')

ylim([0 100])

How to make number appear at top of bar chart


How to make number appear at top of bar chart

A simple loop will do

xLoc = bv(ii).XEndPoints;

yLoc = bv(ii).YEndPoints;

theLabels = strcat( string(yLoc),'%') ;

text(xLoc, yLoc, theLabels, 'vert','bottom','horiz','center');

See Also

Categories

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.

How do I show the values on top of a bar chart in Excel?

In the chart elements list, click on Series then click on the Daily datapoint. Click on the Datapoint Label defaults. In the Appearance tab, select Base to display the counts and percent at the top of the bar. In the Datapoint Label section select Automatic, Value and Percent.

How do I get a data label on top of a bar chart?

Add data labelsClick the chart, and then click the Chart Design tab. Click Add Chart Element and select Data Labels, and then select a location for the data label option. Note: The options will differ depending on your chart type. If you want to show your data label inside a text bubble shape, click Data Callout.