自定义可视化效果的标题、图例和背景(教程)Customize visualization titles, legends, and backgrounds (Tutorial)

在本教程中,你将学习一些用于自定义可视化效果的不同方式。In this tutorial you'll learn a few different ways to customize your visualizations. 有许多选项用于自定义可视化效果,了解所有这些选项的最佳方法是:浏览格式设置窗格(选择 paintroller 图标)。There are so many options for customizing your visualizations, the best way to learn about them all is by exploring the Formatting pane (select the paintroller icon). 为了帮助你入门,本文演示了如何自定义可视化效果的标题、图例和背景。To get you started, this article shows you how to customize a visualization title, legend, and background.

并非所有可视化效果都可以进行自定义,查看完整列表Not all visualizations can be customized, see the complete list.

请观看下面的视频,Amanda 将演示如何在报表中自定义可视化效果(快进到视频的 4:50)。Watch Amanda customize visualizations in her report (fast-forward to 4:50 in the video). 然后,按照视频下方的分步说明操作,用自己的数据自行尝试一下。Then follow the instructions below the video to try it out yourself with your own data.

先决条件Prerequisites

  • Power BI 服务或 Power BI DesktopPower BI service or Power BI Desktop
  • 零售分析示例Retail Analysis sample

在报表中自定义可视化效果标题Customize visualization titles in reports

若要跟着介绍一起操作,请登录到 Power BI 服务 (app.powerbi.com) 并在编辑视图打开零售分析示例报表。To follow along, sign into Power BI service (app.powerbi.com) and open the Retail Analysis Sample report in Editing View.

备注

将可视化效果固定到仪表板时,它会成为仪表板磁贴。When you pin a visualization to a dashboard, it becomes a dashboard tile. 磁贴本身还可以使用新标题和副标题进行自定义,可以是超链接并且可以调整大小The tiles themselves can also be customized with new titles and subtitles, hyperlinks, and resized.

  1. 导航到报表的“新建商店”页面,并选择“按开业月份划分的开业商店计数...”柱形图。Navigate to the "New Stores" page of the report and select the "Open Store Count by Open Month..." column chart.
  2. 在可视化效果窗格中,选择 paintroller 图标以显示格式设置选项。In the Visualizations pane, select the paintroller icon to reveal the formatting options. 然后选择“标题”展开此部分。and select Title to expand that section.

  3. 通过选择“打开”(或“关闭”)滑块来打开和关闭标题Turn Title on and off by selecting the On (or Off) slider. 现在,将它保留为打开For now, leave it On.

  4. 通过在文本字段中输入按开业月份划分的商店计数来更改标题文本Change Title Text by typing Store count by month opened in the text field.
  5. 字体颜色更改为橙色,并将背景色更改为黄色。Change Font color to orange and Background Color to yellow.

    • 选择下拉菜单,然后从主题颜色最近使用的颜色自定义颜色中选择颜色。Select the dropdown and choose a color from the Theme Colors, Recent Colors, or Custom color.
    • 选择下拉菜单以关闭颜色窗口。Select the dropdown to close the color window.

    始终可以通过在颜色窗口中选择恢复到默认值,来恢复为默认颜色。You can always revert to the default colors by selecting Revert to default in the color window.

  6. 将文本大小增加到 12。Increase the text size to 12.
  7. 我们对图表标题进行的最后一个自定义是使它在可视化效果中居中。The last customization we'll make to the chart title is to align it in the center of the visualization. 标题位置默认为左对齐。The title position defaults to left-aligned.

    此时在教程中,柱形图“标题”应如下所示:At this point in the tutorial, your column chart title should look like something like this:

    要恢复目前为止我们进行的所有标题自定义,请在标题自定义窗格底部选择默认到默认值To revert all the title customization we've done so far, select Revert To Default, at the bottom of the Title customization pane.

自定义可视化效果背景Customize visualization backgrounds

在选择相同柱形图的情况下,展开背景选项。With the same column chart selected, expand the Background options.

  1. 通过选择“打开”(或“关闭”)滑块来打开和关闭背景。Turn the background on and off by selecting the On (or Off) slider. 现在,将它保留为打开For now, leave it On.
  2. 将背景色更改为 74% 灰色。Change the background color to 74% grey.

    • 选择下拉菜单,然后从“主题颜色”、“最近使用的颜色”或“自定义颜色”中选择灰色。Select the dropdown and choose a grey color from the Theme Colors, Recent Colors, or Custom color.
    • 将透明度更改为 74%。Change Transparency to 74%.

    要恢复目前为止我们进行的所有背景自定义,请在背景自定义窗格底部选择默认到默认值To revert all the title background customization we've done so far, select Revert To Default, at the bottom of the Background customization pane.

自定义可视化效果图例Customize visualization legends

  1. 打开概述报告页面并选择“按会计月份和区域经理划分的总销售额差异”图表。Open the Overview report page and select the "Total Sales Variance by FiscalMonth and District Manager" chart.
  2. 在“可视化效果”选项卡中,选择画笔图标以打开格式设置窗格。In the Visualization tab, select the paintbrush icon to open the formatting pane.
  3. 展开图例选项。Expand Legend options.

  4. 通过选择“打开”(或“关闭”)滑块来打开和关闭图例。Turn the legend on and off by selecting the On (or Off) slider. 现在,将它保留为打开For now, leave it On.
  5. 将图例移动到可视化效果左侧。Move the legend to the left side of the visualization.
  6. 通过将标题切换为打开,然后在图例名称字段中输入经理,来添加图例标题。Add a legend title by toggling Title to On and, in the Legend name field, typing Managers.

    要恢复目前为止我们进行的所有图例自定义,请在图例自定义窗格底部选择默认到默认值To revert all the legend customization we've done so far, select Revert To Default, at the bottom of the Legend customization pane.

可以自定义的可视化效果类型Visualization types that can be customized

可视化效果Visualization 标题Title 背景Background 图例Legend
分区图area yes yes yes
条形图bar yes yes yes
卡片图card yes yes n/an/a
多行卡片图multi row card yes yes n/an/a
柱形图column yes yes yes
组合图combo yes yes yes
圆环图donut yes yes yes
着色地图filled map yes yes yes
漏斗图funnel yes yes n/an/a
仪表盘gauge yes yes n/an/a
kpikpi yes yes n/an/a
折线图line yes yes yes
映射图map yes yes yes
矩形图matrix yes yes n/an/a
饼图pie yes yes yes
散点图scatter yes yes yes
切片器slicer yes yes n/an/a
table yes yes n/an/a
文本框textbox no yes n/an/a
树状图treemap yes yes yes
瀑布图waterfall yes yes yes

后续步骤Next steps

自定义 X 轴和 Y 轴Customize X-axis and Y-axis
自定义颜色和轴属性Customize colors and axis properties
Power BI - 基本概念Power BI - Basic Concepts
更多问题?More questions? 尝试参与 Power BI 社区Try the Power BI Community