跳到主要内容

如何在Excel中将总标签添加到堆积的柱形图中?

对于堆叠的条形图,您可以轻松地将数据标签添加到堆叠的条形图的各个组件中。 但是有时您需要在堆叠的条形图的顶部显示一个浮动的总计值,以便使图表更易于理解和阅读。 基本图表功能不允许您为各个组件的总和添加总数据标签。 但是,您可以通过以下过程解决此问题。


将总计标签添加到Excel中的堆叠柱形图

假设您具有以下表格数据。

1。 首先,可以通过选择要创建图表的数据并单击以创建堆积的柱形图。 插页 > ,下 二维柱 选择堆叠的列。 查看屏幕截图:

现在已经建立了一个堆积的柱状图。

2。 然后右键单击 总系列 并选择 更改系列图表类型 从右键单击菜单中。

3。 在 更改图表类型 对话框中,单击 图表类型 的下拉列表 合计 数据系列,选择 Line 从下拉列表中,然后单击 OK 按钮。

现在 合计 数据系列已更改为折线图类型。 查看屏幕截图:

4。 选择并右键单击新的折线图,然后选择 添加数据标签 > 添加数据标签 从右键单击菜单中。 看截图:

现在,每个标签都已添加到“总计”数据系列的相应数据点。 数据标签位于每列的右上角。

5。 继续选择数据标签,右键单击并选择 格式化数据标签 从上下文菜单中,查看屏幕截图:

6。 在 格式化数据标签 窗格中的 标签选项 标签,然后检查 以上 在选项 标签位置 部分。 看截图:

7。 然后需要使折线图不可见,右键单击折线,然后选择 格式化数据系列。 看截图:

8。 在 格式化数据系列 窗格中的 填充线 选项卡,检查 没有线 选项。 看截图:

现在,总标签已添加并显示在放样列上方。 但是,“总数据系列”标签仍显示在图表区域的底部。

9。 您可以删除 合计 右键单击数据系列标签,然后从上下文菜单中选择“删除”。 或者,您可以选择Total data series标签,然后按 删除 键将其删除。

到目前为止,您已经创建了一个堆积柱形图,并为每个堆积柱添加了总计标签。


使用出色的工具将总标签添加到堆积的柱形图中

如果你有 Kutools for Excel 安装后,您只需在Excel中轻松单击即可将所有标签总数快速添加到堆积的柱形图中。

Kutools for Excel - 包含 300 多个 Excel 基本工具。 享受全功能 30 天免费试用,无需信用卡! 现在下载!

1。 创建堆积的柱状图。 选择源数据,然后单击 插页 > 插入柱形图或条形图 > 堆积柱.

2。 选择堆叠的柱形图,然后单击 库工具 > 图表 > 图表工具 > 将总和标签添加到图表.

然后,将所有标签总数立即添加到堆叠柱形图中的每个数据点。


在Excel中创建带有总标签的堆积式柱形图

如果你有 Kutools for Excel 安装后,只需单击几下即可同时创建包含总标签和百分比数据标签的堆叠列。

Kutools for Excel - 包含 300 多个 Excel 基本工具。 享受全功能 30 天免费试用,无需信用卡! 现在下载!

1。 假设您已准备好您的源数据,如下图所示。

2。 选择数据源,然后单击 库工具 > 图表 > 百分比堆积图 启用该功能。

3。 在带百分比的堆积柱形图对话框中,请根据需要指定数据范围,轴标签和图例条目,然后单击 OK 按钮。

Tips:带百分比的堆积图功能可以根据所选数据源自动选择数据范围,轴标签和图例条目。 您只需要检查自动选择的范围是否正确即可。

现在,将创建带有总数据标签和数据点标签(以百分比显示)的堆叠柱形图。

笔记:
如果不需要数据点的百分比标签,则可以右键单击百分比标签并选择 删除 从上下文菜单中。 (此操作可以一次删除一组数据系列的百分比标签)


演示:将总计标签添加到Excel中堆积的柱形图


Kutools for Excel:超过 300 个方便的工具触手可及! 立即开始 30 天免费试用,没有任何功能限制。 立即下载!

相关文章:

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (23)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks, it was much helpful.
This comment was minimized by the moderator on the site
Amazing Trick!
This comment was minimized by the moderator on the site
Every single time I touch the chart in any way, the label position of the total switches back to "Right" instead of "Above". Can't even copy/paste-as-picture, reverts back to right-position.

Anyone else seen this issue and figured out how to fix it? (Excel 2016 on Win10)
This comment was minimized by the moderator on the site
Hi Bee,
Please make sure that you have chosen Above option in the Label Position section of the Format Data Labels dialog box in the Step 6.
This comment was minimized by the moderator on the site
Thanks, couldn't come up with this myself!
This comment was minimized by the moderator on the site
Thank you, exactly what I was looking for!
This comment was minimized by the moderator on the site
kalau saya mau membuat data seperti nama bulan total. jadi penjelasannya mengenai banyak org yg mendaftar pada tiap bulan. namn ditambahkan tanggal saat org masuk utk daftar. bagaimana ya
This comment was minimized by the moderator on the site
Thanks v much for this!
This comment was minimized by the moderator on the site
All you need to do to add totals to a stacked bar graph or stacked 3D bar graph is create a text box and in it, refer back to the cell you want to show. Assume you have values of 50, 120 and 30 in three cells A1, A2 and A3 and a total of 200 in A4, all in sheet 1, and you then create a stacked bar chart in Sheet 2. In Sheet 2 you would insert a text box anywhere on the worksheet. In that text box you would type =Sheet1!$A$4 Move it to the top of the bar in the chart and voila, all done. The benefit of this method is that it also works with a 3D stacked bar chart.
This comment was minimized by the moderator on the site
In my experience, when resizing the chart for presentation(powerpoint) the labels do not reposition correctly due to not being tied to the columns.
This comment was minimized by the moderator on the site
This is a great idea, but doesn't work with some negative data points. Because the line goes through the middle of the bars the total data label gets obscured, any ideas?
This comment was minimized by the moderator on the site
very mindful technique, exactly I was looking for
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations