设计报表和视觉对象的最佳做法Best design practices for reports and visuals

我们发布了经过改进的新版 Power BI 导航和内容体验,我们正在更新所有文档。We’ve released a new and improved navigation and content experience for Power BI, and we’re in the process of updating all of our documentation. 此页面上的信息和屏幕截图可能与实际屏幕上的内容不一致。The information and screenshots on this page may not match what you see on your screen. 有关详细信息,请参阅导航 Power BI 服务For more information see Navigating Power BI service.

简介Introduction

本白皮书介绍了有关如何在 Power BI 中设计报表的最佳做法。This paper provides best practices for designing reports in Power BI. 它从规划入手,介绍了可应用于报表及其页面和各个视觉对象的设计原则。Starting with planning, it discusses principles of design that you can apply to your reports and to the pages and individual visuals that make up that report. 其中许多最佳做法同样适用于设计仪表板。Many of these best practices apply to dashboard design as well.

我们希望你可以本白皮书为起点,将所掌握的知识活学活用,设计你自己的报表和可视化效果,同时访问 community.powerbi.com 继续相关交流。BI 报表设计和可视化效果用法是最近的热门话题,许多舆论导向者、博主和网站都对本主题进行了有广度、有深度的探究(我们在本文末尾处列出了几个示例)。We hope this paper will be a jumping-off point for you and that you’ll apply what you learn to your own reports and visualizations and that you’ll continue the conversation on community.powerbi.com. BI report design and visualization usage is a hot topic right now and there are many thought leaders, bloggers, and websites that look at this topic in breadth and depth (we’ve listed a few at the end).

备注

本白皮书中的建议是你在适用情况下遵循的准则。The recommendations made in this white paper are guidelines for you to apply when and where it makes sense. 对于下述每个原则,通常有令人信服的理由才能“违反规则”。For every principle we describe below, there are usually valid reasons to “break the rule.”

信息让我们不知所措,不是因为信息太多,而是因为我们不知道如何让信息为自己所用。We are overwhelmed by information, not because there is too much, but because we don't know how to tame it. -- Stephen Few-- Stephen Few

背景知识和术语概述A look at the landscape and terminology

在 Power BI 中,报表可以有一个或多个报表页面,所有页面一起统称为报表。In Power BI, a report can have one or more report pages and all the pages together are collectively referred to as the report. 报表的基本元素包括视觉对象(亦称为“可视化效果”)、独立图像和文本框。The basic elements of the report are visuals (aka visualizations), standalone images, and text boxes. 从各个数据点到报表元素,再到报表页面本身,有数不清的格式选项可供选择。From the individual data points, to the report elements, to the report page itself, there are innumerable formatting options.

我们将先介绍报表规划阶段,接着介绍基本的报表设计原则,然后介绍视觉对象设计原则,最后介绍各种视觉对象类型的最佳做法。We’ll start at the report planning stage, continue on to basic report design principles, then discuss visual design principles, and finish with a discussion of best practices for individual visual types.

有关生成和使用 Power BI 报表的详细指南和说明,请访问 powerbi.com 中的“学习”。In-depth guidance and instructions for creating and using Power BI reports is available at powerbi.com > Learn.

生成第一个可视化效果前重点了解需求Before you build your first visualization…focus on requirements

报表生成工作在生成第一个视觉对象之前就开始了,因为优质的报表需要提前规划。Creating a report starts before you build your first visual because a good report needs planning. 请了解需要处理哪些数据,并记下要满足的报表需求。Know what data you have to work with and write down the requirements for the report. 仔细想想,业务需求是什么?此类数据的使用方式是什么?读者是谁?Ask yourself “What is the business need, how is this data going to be used, and by whom?” 要回答的一个关键问题是,读者希望能够根据此报表做出哪些决策?A key question is “what decisions does the reader want to be able to make based on this report?”

这些问题的答案决定了你的设计方向。The answer to those questions will drive your design. 每个报表都需要向读者传达信息。Every report tells a story. 请确保所传达的信息能够满足业务需求。Make sure that story matches the business need. 我们可能很容易就会添加提供引人注目的见解的视觉对象,但如果这些见解不能满足业务需求,报表就是没用的,实际上这些视觉对象可能会分散用户注意力。It may be tempting to add visuals that show dramatic insights, but if those insights don’t match the business need, then the report won’t be useful – and in fact your users might be distracted by those visuals. 此外,你可能会发现,无法从此类数据中获得做决策时所需的信息。Also, you may find that the information needed to make that decision cannot be gleaned from this data. 这样的报表能用来衡量所需指标吗?Can this report be used to measure what is needed?

报表可用于监视、发现、跟踪、预测、衡量、管理、测试等用途。Reports can be used to monitor, uncover, track, predict, measure, manage, test, and more. 例如,如果业务需求是要生成可衡量业绩的销售报表,可以采用如下报表设计:着眼于当前销售额,与之前的销售额进行对比,与竞争对手进行对比,添加一些可触发警报的 KPI。If, for example, the business need is a sales report that measures performance, then you might design a report that looks at current sales, compares it to previous sales, compares to competitors, and includes some KPIs that trigger alerts. 读者可能会深入了解销售数据,以发现可能会影响销售额的店面关闭或供应链问题。Perhaps readers can drill down into the sales numbers to see store closures or supply chain issues that may be impacting sales. 另一种深入了解数据的方式或许是按商店、地区、产品、季节等因素查看销售额。Another drilldown might be the ability to look at sales by store, region, product, season, and more.

请了解使用报表的客户,使用客户熟悉的术语设计数据细化和复杂程度与客户的认知水平相当的报表。Know the customers for the report and design a report that uses familiar terminology and provides data at a level of detail and complexity on par with the customers’ level of knowledge. 客户类型不止一种?Have more than one type of customer? 没有一种放之四海皆准的原则。可以根据专业知识类别设计单独的报表页面。请务必为每个页面添加明确的标签,以便客户可以自行识别。One size doesn’t always fit all; design separate report pages based on expertise and be sure to label each page clearly so customers can self-identify. 也可以使用切片器,以便客户能够根据自己的需求定制页面。Another option is to use slicers so customers can tailor the page to fit them. 请在规划阶段仔细考虑客户需求,避免生成自以为客户需要的报表的错误做法。Involve the customer in the planning stage and avoid the mistake of building what you think they need. 请做好重新开始和不断迭代的准备。Be prepared to start over and to iterate.

在确认业务需求、客户以及要添加的指标后,下一步是选择合适的视觉对象传达信息,并尽可能以最有效的方式呈现这些视觉对象。Once you’ve identified the business need, the customers, and the metrics you’d like to include, the next step is to pick the right visuals to tell the story and present those visuals in the most-effective way possible. 这涉及很多方面,我们将从一些基本的报表设计原则入手。That covers a lot of ground, and we’ll start with some basic principles of report design.

报表设计原则Principles of report design

报表页面的空间有限,最困难的就是要在此空间内呈现所需的全部元素,同时还易于读者理解。A report page has limited space and one of the hardest things is to fit all the elements you want into that space – and still have that information be easily understood. 亦不能漠视“美观”的价值所在。And don’t underplay the value of “pretty.” 关键是要在美观和实用性之间找到平衡。The key is to find the balance between pretty and useful.

接下来,我们要了解布局、清晰度和美观。Let’s take a look at layout, clarity, and aesthetics.

布局 - 报表画布Layout - the report canvas

报表画布的空间有限。The report canvas has a finite amount of space. 如果无法在一个报表页面上呈现所有元素,请将报表划分成多个页面。If you can’t fit all the elements on a single report page, break the report up into pages. 报表页面可针对特定的受众(例如,HR、IT、销售人员、SLT)或业务问题(例如,缺陷对我们的故障时间造成了怎样的影响?我们的市场营销活动对人气有什么影响?),或用于渐进式传达信息(例如,第 1 页为概述或引人注目的引子,第 2 页继续传达数据信息,第 3 页深入传达数据信息等)。A report page can be tailored to a specific audience (e.g., HR, IT, Sales, SLT), or to a specific business question (e.g., How are defects impacting our downtime?, What is our Marketing campaign’s impact on Sentiment?) or as a progressive story (e.g. first page as overview or attention-grabbing “hook”, 2nd page continues the data story, 3rd page dives deeper into the story, etc.). 如果使用一个页面就能呈现整个报表,那太棒了。If your entire report fits on a single page, great. 如果不能,请创建对内容进行逻辑分块的各个报表页面。If it doesn’t, create separate report pages that logically chunk the content. 另外,别忘了为页面命名有意义的实用名称。And don’t forget to give the pages meaningful and helpful names.

想想我们是如何布置美术馆的。Think about filling an art gallery. 你不会将 50 幅艺术作品放在一个小房间内,也不会在房间里放满椅子,更不会每面墙涂不同的颜色。You wouldn’t put 50 pieces of artwork into a small room, fill it with chairs and paint each wall a different color. 作为管理者,你只会选择主题相同的艺术作品,将它们陈列在空间足以访客走动和思考的房间内,并放置描述艺术作品概况的信息卡。As the curator, you’d choose just pieces that have a common theme, lay them out around the room with plenty of space for visitors to move and think, and place informational cards that describes what they’re looking at. 这就是大多数现代美术馆采用素色墙面的原因所在!And there’s a reason most modern galleries have plain walls! 对于本文,我们将从有多处需要改进的示例报表入手。For this article, we’ll start with a report example that needs a lot of work. 在我们遵循最佳做法和设计原则修改报表后,我们的报表将会有所改进。As we apply our best practices and principles of design, our report will improve.

图 1:此报表页面非常难看,有许多需要改进的地方Figure 1: This ugly report page needs a lot of work

上述示例存在许多与空间相关的(布局)设计问题,具体如下:The example above has many space-related (layout) design issues that we’ll discuss below:

  • 对齐、有序和邻近区域alignment, order, and use of proximity
  • 空间和排序使用不当poor use of space and sorting
  • 杂乱无章clutter

对齐、有序和邻近区域Alignment, order, and proximity

报表元素的布局不仅会左右读者对报表的理解,还是读者浏览报表页面时的导引。The layout of your report elements impacts comprehension and guides the reader through the report page. 元素的布置方式也在向读者传达信息。How you place and position elements tells a story. 信息可能是“从这里开始查看,然后查看这里”,也可能是“这 3 个元素彼此相关”。The story might be “start here and then look here” or “these 3 elements are related to each other.”

  • 在大多数文化中,人们从左往右、从上往下进行浏览。In most cultures, people scan from left to right and top to bottom. 请将最重要的元素放置在报表左上角。Position the most important element in the top left corner of your report. 其他视觉对象的排列方式要有助于读者有逻辑地浏览和理解信息。And organize the rest of the visuals in a way that leads to logical navigation and comprehension of the information.
  • 将需要读者选择的元素置于受读者选择影响的可视化效果的左侧:例如,切片器。Position elements that require the reader to make a choice to the left of the visualizations the choice will impact: slicers, for example.
  • 将相关元素置于邻近位置;邻近区域内的元素相关。Position related elements close to each other; proximity implies the elements are related.
  • 另一种表示关系的方法是在相关元素周围添加边框或颜色背景。Another way to convey relationships is to add a border or color background around related elements. 相反,添加分隔条可以区分报表的不同部分。Conversely, add a divider to distinguish between different sections of a report.
  • 使用空白区域在视觉上对报表页面的各部分进行分块。Use white space to visually chunk sections of the report page.
  • 填满整个报表页面。Fill the report page. 如果发现有大量额外的空白区域,请放大可视化效果或缩小画布。If you find that you have a lot of extra white space, make your visualizations larger or make the canvas smaller.
  • 精心调整报表元素大小。Be intentional with sizing your report elements. 不要通过可用空间大小来决定可视化效果大小。Don’t let space availability dictate the size of a visualization.
  • 让重要元素大于其他元素,或添加视觉元素(如箭头),以吸引读者注意力。Make important elements larger than the others or add a visual element like an arrow to draw attention.
  • 在报表页面上以对称方式或精心设计的不对称方式对齐元素。Align the elements on the report page, either symmetrically or intentionally asymmetrically.

接下来,我们将进一步了解对齐。Let’s take a closer look at alignment.

对齐Alignment

对齐并不意味着不同组件的尺寸必须相同,也不是说报表上的每一行都必须有相同数量的组件。Alignment doesn’t mean that that the different components need to be the same size or that you must have the same number of components on each row of the report. 只是说,页面采用有助于读者浏览和提高可读性的结构。It just means that there is a structure to the page that aids in navigation and readability.

在下面的更新报表中,我们会发现报表组件现在采用两端对齐,并且每个报表行也都采用水平对齐和垂直对齐。We can see in our updated report below that the report components are now aligned on the left and right edges and each report row is aligned horizontally and vertically as well. 切片器位于受其影响的视觉对象的左侧。Our slicers are to the left of the visuals they impact.

图 2:改进并修改了难看的示例报表的布局Figure 2: Our ugly report example improved with layout edits

Power BI 提供帮助你对齐视觉对象的工具。Power BI includes tools to help you align your visuals. 在 Power BI Desktop 中,如果选择多个视觉对象,可以使用“视觉对象”功能区选项卡上的“对齐和分布”选项来对齐视觉对象。In Power BI Desktop, with multiple visuals selected, you can use the Align and Distribute options on the Visuals ribbon tab to match up the position of visuals.

图 3:在 Power BI Desktop 中对齐视觉对象Figure 3: Align visuals in Power BI Desktop

在联机 Power BI 和 Power BI Desktop 中,还可以使用格式窗格上的“常规”选项卡精确控制所有视觉对象的大小和位置:In Power BI online and Power BI Desktop, you also have precise control over the size and position of visuals through the General tab on the formatting pane for all visuals:

图 4:设置视觉对象的确切位置Figure 4: Set exact position for your visual

在我们的示例报表页面(图 2)中,2 张卡片和一个大边框的“X 位置”设置为 200。In our example report page (Figure 2), the 2 cards and large border are aligned on the X Position at 200.

填满整个空间Fit to the space

请充分利用现有空间。Make the best use of the space you have. 如果已确定报表的查看/显示方式,请在设计时注意这一点。If you know how the report will be viewed/displayed, design with that in mind. 减少空白区域,填满整个画布。Reduce empty space to fill the canvas. 尽量不要对各个视觉对象使用滚动条。Do all you can to eliminate the need for scrollbars on individual visuals. 在填满整个空间的同时,确保视觉对象看起来没有狭促感。Fill the space without making the visuals seem cramped.

调整页面尺寸Adjust the page size

缩小页面后,各个元素相对于整个页面就会放大。By reducing the page size, individual elements become larger relative to the overall page. 为此,可取消选择页面上的所有视觉对象,然后使用格式窗格中的“页面尺寸”选项卡。Do this by deselecting any visuals on the page and using the Page Size tab in the formatting pane.

下面展示的报表页面先是采用了 4:3 的页面宽高比,然后采用了 16:9 的页面宽高比。Here is a report page using page size 4:3 and then using 16:9. 请注意,布局更适应 16:9。Notice how the layout suits 16:9 so much better. 空间足够,可以从第二个视觉对象中删除滚动条。There is even enough room to remove the scrollbar from the second visual.

图 5a:采用 4:3 页面宽高比的报表Figure 5a: The report at 4:3 page size

图 5b:采用 16:9 页面宽高比的报表Figure 5b: The report at 16:9 page size ratio

你的报表是采用 4:3、16:9,还是其他宽高比?Will your report be viewed 4:3, 16:9 or another ratio? 小屏幕还是大屏幕?On small screens or huge screens? 还是要适应所有可能的屏幕宽高比和尺寸?Or on all possible screen ratios and sizes? 请在设计时注意这一点。Design with this in mind.

我们的示例报表页面看起来有点狭促。Our example report page seems a bit cramped. 在未选择任何视觉对象的情况下,选择滚动油漆刷图标,打开格式窗格。With no visual selected, open the formatting pane by selecting the paintroller icon. 展开“页面尺寸”,然后将“高度”更改为 900。Expand Page Size and change Height to 900.

图 6:增加页面高度Figure 6: Increase page height

整齐有序Reduce clutter

杂乱无章的报表页面很难一眼就理解,甚至可能会令读者感到不知所措,干脆不看。A cluttered report page will be hard to understand at-a-glance and may be so overwhelming that readers won’t even try. 请删除所有不必要的报表元素。Get rid of all report elements that aren’t necessary. 不要添加对信息理解或浏览没有促进作用的附加项。Don’t add bells-and-whistles that don’t help comprehension or navigation. 报表页面必须尽可能明确、快速、一致地传达信息。Your report page needs to convey the information as clearly and quickly and cohesively as it can.

Edward Tufte 在他的《定量信息的视觉显示》一书中将这称为“数据/墨迹比率”。Edward Tufte calls it “data to ink ratio” in his book The Visual Display of Quantitative Information. 其实就是删除所有不必要的内容。Basically, remove anything that isn’t essential.

让内容整齐有序会增加报表页面上的空白区域,让你有更多实际空间来遵循上述“对齐、有序和邻近区域”部分中介绍的最佳做法。The clutter you remove will increase the whitespace on your report page and give you more real estate for applying the best practices we learned about above in the “Alignment, order, and proximity” section.

此时,我们的示例报表已经美观多了。Here our example is already looking better. 我们已让内容整齐有序许多,并添加了形状对元素进行分组。We’ve removed lots of clutter and added shapes to group elements together. 我们删除了背景图像以及不必要的箭头形状和文本框,并将一个视觉对象移至报表中的另一页面,等等。我们还延长了页面,增加了空白(黄色?)空间。The background image is gone, the unnecessary arrow shape and text box are gone, one visual has been moved to another page in the report, etc. We’ve also lengthened the page size to increase white (yellow?) space.

图 7:难看的示例报表变得整齐有序Figure 7: Our ugly report example de-cluttered

信息传达一目了然Tell a story at a glance

总体测试应为,在事先完全不知道的情况下,无需其他人说明解释即可快速理解报表。The overall test should be that somebody without any prior knowledge can quickly understand the report without any explanation from anybody. 读者应能够在快速概览后迅速获取页面以及每个图表/表所要传达的信息。With a quick glance, readers should be able to quickly see what the page is about and what each chart/table is about.

在查看报表时,读者应首先注意到你希望他们看到的元素,然后继续从左往右从上往下进行扫视。When readers look at your report, their eyes should be drawn to the element you want them to look at first and their eyes will then continue left-right-top-down. 通过添加文本框标签、形状、边框、字号和颜色等视觉提示可以更改此行为。Change this behavior by adding visual cues like text box labels, shapes, borders, size, and color.

文本框Text boxes

有时,可视化效果的标题不足以传达信息。Sometimes the titles on visualizations aren’t enough to tell the story. 请添加文本框,向报表读者传达信息。Add text boxes to communicate with the people viewing your reports. 文本框可以描述报表页面、一组视觉对象或单个视觉对象。Text boxes can describe the report page, a grouping of visuals, or describe an individual visual. 可用于阐述结果或更好地定义视觉对象、视觉对象中的组件或视觉对象之间的关系。They can explain results or better-define a visual, components in the visual, or relationships between visuals. 文本框可用于根据文本框中突出显示的不同条件来吸引读者注意力。Text boxes can be used to draw attention based on different criteria called out in the text box.

在 Power BI 服务中,选择顶部菜单栏中的“文本框”。In Power BI service, from the top menubar, select Text Box. (在 Power BI Desktop 中,选择“插入”功能区中的“文本框”。)(In Power BI Desktop, select Text Box from the Insert area of the ribbon.)

图 8:添加文本框Figure 8: Add a text box

在空框中键入内容,然后使用底部控件设置字体、字号、对齐方式等。Type in the empty box and then use the controls at the bottom to set font face, size, alignment, and more. 使用图柄可调整文本框的大小。Use the handles to resize the box.

图 9:设置文本框格式Figure 9: Format the text box

不过,也不要矫枉过正!But don’t overdo it! 如果报表上有太多的文本,会分散读者对视觉对象的注意力。Too much text on a report is distracting and detracting from the visuals. 当你发现报表页面需要大量文本才能被读者理解时,请重新开始。If you find that your report page requires a ton of text to make it understandable, then start over. 能否选取其他视觉对象来更好地传达信息?Can you pick a different visual that tells a better story on its own? 能否调整视觉对象的原生标题,使其更易于理解?Can you tweak the visual’s native titles to make it more intelligible?

文本Text

请创建文字样式指南,应用于所有报表页面。Create a text style guide and apply it to all pages of your report. 只选取少量字体、字号和颜色。Pick just a few font faces, text sizes, and colors. 此样式指南不仅可应用于文本元素,还可用于为可视化效果的标题和标签选择字体(见下文中的“可视化效果的标题和标签”)。Apply this style guide to not only textual elements but to the font choices you make within your visualizations (see Titles and labels that are part of the visualizations, below). 请设置规则,规定何时使用粗体、斜体、特定颜色、增大字号等。Set rules for when you’ll use bold, italics, increased font size, certain colors, and more. 尽量避免全部字母大写或使用下划线。Try to avoid using all capitalization or underlining.

形状Shapes

形状也有助于信息浏览和理解。Shapes too can aid navigation and comprehension. 使用形状可以将相关信息归到一起、突出显示重要数据,还可以使用箭头引导读者视线。Use shapes to group related information together, highlight important data, and use arrows to direct the eye. 形状有助于读者了解从何处开始查看以及如何理解报表。Shapes help readers understand where to start and how to interpret your report. 在设计术语中,这通常称为 对比。In design terms, this is often referred to as contrast.

图 10a:Power BI 服务中的“形状”Figure 10a: Shapes in Power BI service

图 10b:Power BI Desktop 中的“形状”Figure 10b: Shapes in Power BI Desktop

我们的示例页面现在看上去怎么样?What does our example page look like now? 图 11 展示的页面更加清晰明确、整齐有序,其中字体、字号和颜色的使用一致。Figure 11 shows a cleaner, less cluttered page with a consistent use of text faces, fonts, and colors. 左上角的页面标题对页面进行了介绍。Our page title in the top-left corner tells us what the page is all about.

图 11:应用了文本指南并添加了标题的示例报表Figure 11: Our report example with text guidelines applied and title added

在示例报表中,报表页面标题添加在左上角,即读者首先注意到的位置。In our example, a report page title was added in the top left corner; the first place readers look. 标题的字号为 28,字体为 Segoe Bold,有助于与页面的其余内容区分开来。Font size is 28 and font is Segoe Bold to help it stand out from the rest of the page. 我们的文本样式指南要求无背景、黑色标题、图例和标签,应用于页面上的所有可编辑视觉对象(组合图坐标轴和标签不可编辑)。Our text style guide calls for no backgrounds, black titles, legends, and labels and that was applied to all visuals on the page, where possible (the Combo chart axes and labels are not editable). 此外:Additionally:

  • 卡片:将“类别标签”设置为“关”,将“标题”设置为“开”,将文本样式设置为 12 磅、黑色、居中。Cards: Category label set to Off, Title turned On and set to 12pt black centered.
  • 视觉对象标题:如果启用,将文本样式设置为 12 磅、左对齐。Visual titles: if turned On, set to 12pt and left-aligned.
  • 切片器:将“标头”设置为“关”,将“标题”设置为“开”。Slicers: Header set to Off, Title turned On. 保留“项” > “文本”设置,即为灰色和 10 磅。Leave Items > Text grey and 10pt.
  • 散点图和柱形图:如果使用,将 X 轴和 Y 轴以及对应标题设置为黑色字体。Scatter and column charts: black font for X and Y axes and X and Y axes titles, if used.

颜色Color

使用颜色是为了保持一致性。Use color for consistency. 我们将在下文中的“可视对象设计原则”中详细介绍颜色。We’ll talk more about color in Principles of visual design, below. 不过,在这一部分中,我们指的是精心选择颜色,确保颜色不会干扰读者快速理解报表。But here we’re referring to being deliberate in your selection of color so that it doesn’t detract from your readers being able to quickly understand your report. 过多明亮的颜色会妨碍理解。Too many bright colors barrage the senses. 这一部分更侧重于颜色使用禁忌。This section is more what not to do with color.

背景Backgrounds

设置报表页面的背景时,请选择不会令报表黯然失色、与页面上的其他颜色不冲突或一般不会引起眼部不适的颜色。When setting backgrounds for report pages, choose colors that don’t overshadow the report, clash with other colors on the page, or generally hurt the eyes. 请注意某些颜色内在的固有含义。Realize that some colors have inherent meaning. 例如,在美国,如果在报表中使用红色,通常会被理解为“不好”。For example, in the US, red in a report is typically interpreted as “bad”.

图 12:设置报表背景Figure 12: Set report background

你不是要创作艺术作品,而是要生成功能报表。You’re not creating a work of art, but a functional report. 请选择可提高可读性并突出报表元素的颜色。Choose a color that improves the readability and prominence of the report elements.

调查网页中颜色和可视化效果的使用情况后发现,颜色对比度越高,理解速度就越快(请参阅文本和背景色对网页视觉搜索的影响和确定用户对网页视觉复杂度和审美特征的看法)。A study on the use of color and visualizations within Web pages found that higher contrast between colors increases the speed of comprehension (The effect of text and background colour on visual search of Web pages* and *Determining Users’ Perception of Web Page Visual Complexity and Aesthetic Characteristics.)

我们已在下面的示例报表(图 20 和 21)中应用了一些有关颜色的最佳做法。We’ve applied some color best practices to our example report (Figure 20 and 21) below. 最明显的是,我们将背景色改成了黑色。The most-notable was that we changed the background color to black. 黄色太明亮,会引起眼部不适。The yellow was too bright and strained our eyes. 此外,“按年份和奖牌等级划分的运动员姓名计数”图表上的黄色条部分会与黄色背景融为一体。Also, on the “Count of athlete name by year and class” chart, the yellow portion of the bars disappeared into the yellow background. 使用黑色(或白色)背景可实现最高对比度,让视觉对象成为焦点。Using a black (or white) background gives us maximum contrast and makes the visuals the focus of attention.

下面是我们为了改进示例报表所执行的其他步骤:Here are the additional steps we took to improve the example report:

页面标题Page title

当我们将背景更改为黑色时,标题会消失,因为文本框字段只允许黑色字体。When we changed the background to black, our title disappeared because the text box field only allows black font. 若要解决此问题,请改为添加文本框标题。To fix this, add a text box title instead. 选择文本框后,清除文本,然后在“可视化效果”选项卡中选择“标题”,将其设置为“开”。With the text box selected, erase the text and in the Visualizations tab, select Title and turn it On. 选择箭头以展开“标题”选项,在“标题文本”字段中键入“夏季奥运会”,然后选择白色作为“字体颜色”。Select the arrow to expand the Title options, type Summer Olympic Games into the Title Text field and select white Font color.

图 13:添加页面标题Figure 13: Add a page title

卡片Cards

对于卡片视觉对象,打开格式窗格(滚动油漆刷图标),然后将“背景”设置为“开”。For the card visuals, open the formatting pane (paint roller icon) and turn Background On. 选择白色,透明度为 0%。Select white with a transparency of 0%. 然后,将“标题”设置为“开”,选择白色作为“字体颜色”,选择黑色作为“背景色”。Then turn Title On, select Font color white and Background color black.

切片器Slicers

到目前为止,两个切片器的格式不同,没有任何设计意义。Up to this point the two slicers had different formatting, which doesn't make design sense. 对于这两个切片器,请将背景色更改为水绿色。For both slicers, change the background color to aqua. 最好选择水绿色,因为着色地图、树状图和柱形图使用了这种颜色,进而页面调色板中也有这种颜色。Aqua is a good choice because it is part of the page’s color palette – you can see it in the filled map, tree map, and column chart.

图 14:更改切片器背景色Figure 14: Change slicer background color

添加细白框。Add a thin white border.

图 15:为切片器添加边框Figure 15: Add a border to the slicer

由于在水绿色背景上灰色字体显示不清,因此,请将“项”颜色更改为白色。The grey font is hard to see against the aqua, so change the Items color to white.

图 16:更改切片器字体颜色Figure 16: Change slicer font color

最后,在“标题”下方,将“字体颜色”更改为白色,并添加黑色作为“背景色”。And, finally, under Title, change Font color to white and add a black Background color.

图 17:设置切片器标题格式Figure 17: Format slicer title

矩形Rectangle shape

矩形也会与黑色背景融为一体。The rectangle too has disappeared into the black background. 若要解决此问题,请选择矩形,然后在“设置形状格式”窗格中,将“背景”设置为“开”。To fix this, select the shape and in the Format shape pane, turn Background On.

图 18:设置形状格式Figure 18: Format the shape

柱形图、气泡图、着色地图和树状图Column charts, bubble chart, filled map, and tree map

为报表页面上的其余视觉对象添加白色背景。Add a white background to the remaining visuals on the report page. 在格式窗格中,展开“线”选项,然后将“线条颜色”设置为白色,并将“线条粗细”设置为 3。From the formatting pane, expand the Line option and set the Line Color to white and Weight to 3.

图 19:为其余可视化效果添加白色背景Figure 19: Add a white background to remaining visualizations

图 20:应用了颜色最佳做法(黑色背景)的示例报表Figure 20: Report example with color best practices applied (black background)

图 21:应用了颜色最佳做法(白色背景)的示例报表Figure 21: Report example with color best practices applied (white background)

美观Aesthetics

上文已介绍我们要考虑的大部分美观问题,如对齐、颜色、字体选择、让内容整齐有序。Much of what we would consider aesthetics has already been discussed above: things like alignment, color, font choices, clutter. 不过,还有其他一些有关报表设计的最佳做法值得介绍,这些最佳做法针对的是报表的整体外观。But there are a few more best practices for report design worth discussing and these deal with the overall appearance of the report.

请注意,报表旨在满足业务需求,而不是为了追求美观。Remember that the function of your report is to meet a business need; not to be pretty. 不过,追求一定程度的美观还是有必要的,尤其是在涉及第一印象时。But some level of beauty is required, especially when it comes to first impressions. Nashville 顾问 Tony Bodoh 解释道:“情绪先于逻辑产生。”Nashville consultant Tony Bodoh explains "Emotion fires a half-second before logic can kick in." 读者首先对报表页面有情绪反应,然后才会花更多时间深入了解。Readers will first react at an emotional level to your report page, before they take more time to dig deeper. 如果页面看起来杂乱无章、令人困惑、不专业,读者可能永远不会发现它要传达的重要信息。If your page looks disorganized, confusing, unprofessional…your reader may never discover the powerful story it tells.

TDI 博主和 TechTarget 行业分析师 Wayne Eckerson 打了一个非常形象的比方。TDI blogger and TechTarget industry analyst Wayne Eckerson has a great analogy. 设计报表就像是在装饰房间。Designing a report is like decorating a room. 随着时间的推移,你会购买花瓶、沙发、茶几、油画。Over time you purchase a vase, a sofa, end table, a painting. 所有这些元素单看起来你都很喜欢。Separately you like all of these elements. 尽管选定的每个元素都有意义,但将这些对象放在一起来看便会产生冲突或分散注意力。But although each individual selection makes sense, collectively the objects clash or compete for attention.

请集中精力执行以下操作:Concentrate on:

  • 创建通用报表主题或外观,并将其应用于所有报表页面Creating a common theme or look for your report, and apply it to all pages of the report
  • 使用独立图像和其他图形来帮助传达信息,而不分散读者注意力Using standalone images and other graphics to support and not detract from the real story
  • 应用本文到目前为止介绍的所有最佳做法。And applying all the best practices we discussed up to this point in the article.

可视对象设计原则Principles of visual design

我们已经介绍了报表设计原则,即如何布置报表元素,以便读者能够轻松快速地获取报表所要传达的信息。We’ve looked at the principles of report design; how to organize the report elements in a way that makes the report easy to quickly grasp. 现在,我们将了解视觉对象本身的设计原则。Now we’ll look at design principles for visuals themselves. 然后,在下一部分中,我们将深入了解各个视觉对象,以及与一些更常用视觉对象类型有关的最佳做法。And, in the next section, we’ll dig down into individual visuals and discuss best practices for some of the more commonly-used types.

在本部分中,我们将暂时不看示例报表页面,而是看看其他示例。In this section, we’re going to leave our example report page alone for a while and look at other examples. 在了解可视对象设计原则后,我们将重新回到示例报表页面,并应用我们所掌握的最佳做法(按分步说明操作)。After we’ve gone through the principles of visual design, we’ll return to our example report page and apply what we’ve learned (with step-by-step instructions).

规划 - 选择合适的视觉对象Planning – choose the right visual

每个视觉对象同样需要规划,就像开始生成报表前的规划一样重要。Just as it’s important to plan out your report before you start building, each visual also requires planning. 仔细想想,我要通过这个视觉对象传达什么信息?Ask yourself “what story am I trying to tell with this visual?” 然后确定哪种类型的视觉对象能够最形象地传达信息。And then figure out which visual type will tell the story best. 虽然可以条形图的形式显示销售周期进度,但瀑布图或漏斗图是不是更形象?You could show progress through a sales cycle as a bar chart but wouldn’t a waterfall or funnel chart tell it better? 有关这方面的帮助,请参阅本白皮书的最后一部分“视觉对象类型和最佳做法”,其中介绍了与一些更常用视觉对象类型有关的最佳做法。For help with this, read the last section of this paper “Visual types and best practices” which describes best practices for some of the more-common types. 经常出现的状况是,选择的第一个视觉对象类型到头来不是最佳选择,不必对此感到惊讶。Don’t be surprised if the first visual type you pick doesn’t end up being your best option. 请尝试多种视觉对象类型,看看哪个才是最佳选择。Try more than one visual type to see which one makes the point best.

了解分类数据和定量数据的区别,知道哪些视觉对象类型最适用于哪些数据类型。Understand the difference between categorical and quantitative data and know which visual types work best with what type of data. 定量数据通常称为“度量值”,一般是数值。Quantitative data is often referred to as measures and it’s typically numeric. 分类数据通常称为“维度”,可进行分类。Categorical data is often referred to as dimensions and can be classified. 下面的“选择合适的度量值”中对此进行了更深入的介绍。This is discussed in more depth in “Choose the right measure”, below.

避免只出于让报表更令人印象深刻的目的而使用花哨或更复杂的视觉对象类型。Avoid the temptation to use fancy or more-complex visual types just to make your report look more impressive. 只需选择能够传达信息的最简单选项即可。What you want is the most-simple option for conveying your story. 水平条形图和简单的折线图就能快速传达信息。Horizontal bar charts and simple line charts can convey information quickly. 这两种类型的图表为人们所熟悉,大多数读者都可以轻松理解。They are familiar and comfortable and most readers can interpret them easily. 还有一个好处就是,大多数读者都是从左往右和从上往下进行阅读,因此可以快速扫视和理解这两种类型的图表。An added advantage is that most people read left-to-right and top-to-bottom and these two chart types can therefore be scanned and comprehended quickly.

你选择的视觉对象是否需要通过滚动才能传达信息?Does your visual require scrolling to tell the story? 请尽量避免使用滚动条。Avoid scrolling if you can. 尝试应用筛选器和层次结构/向下钻取。如果还是无法避免使用滚动条,请考虑选择其他类型的视觉对象。Try applying filters and making use of hierarchies/drilldown, and if those don’t eliminate the scrollbar, consider choosing a different visual type. 如果一定要使用滚动条,水平滚动比垂直滚动更易于被接受。If you can’t escape scrolling, horizontal scrolling is tolerated better than vertical scrolling.

即使你的选择绝对是最适合传达相应信息的视觉对象,也仍可能需要借助其他元素的力量。Even when you choose the absolutely-best visual for the story, you might still need help telling the story. 这就是需要设置标签、标题、菜单、颜色和字号的原因所在。That’s where labels, titles, menus, color, and size come in. 我们稍后将在“设计元素”部分中介绍这些设计元素。We’ll discuss these design elements later in the section titled “Design elements”.

选择合适的度量值Choose the right measure

视觉对象传达的信息是否引人入胜?Is the story your visual telling compelling? 这重要吗?Does it matter? 不要为了构建视觉对象而构建视觉对象。Don’t build visuals for the sake of building visuals. 你或许会认为数据传达的信息非常吸引人,但事实并非如此。Maybe you thought the data would tell an interesting story, but it doesn’t. 不要害怕重新开始来尝试更吸引人的信息传达方式。Don’t be afraid to start over and look for a more-interesting story. 或者,信息传达方式不是最佳,可能需要采用不同的衡量方式。Or, maybe the story is there but it needs to be measured in a different way.

例如,假设你想要衡量销售经理的业绩。For example, say you want to measure the success of your sales managers. 为此,你会使用什么度量值呢?What measure would you use to do this? 最好的度量方式是以总销售额/总利润、同比增长,还是以目标实现率为依据呢?Would you measure that best by looking at total sales or total profit, growth over previous year or performance against a target goal? 销售人员 Sally 可能创造了最大的利润,如果你在条形图中按销售人员划分总利润,相比其他销售人员,她将成为销售之星。Salesperson Sally might have the largest profit, and if you showed total profit by salesperson in a bar chart, she would look like a rockstar compared to the other salespeople. 不过,如果 Sally 的销售成本(差旅费、运费、制造成本等)也非常高,仅以销售额为依据并不是传达信息的最佳方式。But if Sally has a high cost of sales (travel expenses, shipping costs, manufacturing costs, etc.), simply looking at sales doesn’t tell the best story.

反映事实/不歪曲事实Reflect reality/don’t distort reality

构建的视觉对象可能会歪曲事实。It’s possible to build a visual that distorts the truth. 有一个网站,上面全是数据狂热分子共享的“歪曲事实”视觉对象。There’s a website where data enthusiasts share “bad” visuals. 评论中的常见主旋律是,对创建并分发此类视觉对象的公司感到十分失望。And the common theme in the comments is disappointment in the company that created and distributed that visual. 这也是在暗示无法信任这些公司。It sends the message that they can’t be trusted.

因此,不要创建有意歪曲事实以及按你的要求传达信息的视觉对象。So create visuals that don’t intentionally distort reality and that aren’t manipulated to tell the story you want them to tell. 示例如下:Here is an example:

图 22:歪曲事实的图表Figure 22: Distorted reality chart

在此示例中,好像 4 家公司之间的差距巨大,而且公司 B 的业绩要远远高于其他 3 家公司。In this example, it appears as if there is a big difference between the 4 companies, and that CorpB is way more successful than the other 3. 但请注意,X 轴并不是从 0 开始,所以各家公司之间的差距很可能就在误差范围之内。But notice that the X axis doesn’t start at zero and that the differences between the companies is likely within the margin of error. 下面是数据相同但 X 轴从零开始的图表。Here’s the same data with an X axis that does start at zero.

图 23:反映事实的图表Figure 23: Realistic chart

读者往往认为 X 轴是从零开始的。Readers expect and often assume the X axis is starting at zero. 如果你决定不从零开始,请不要歪曲事实,考虑添加视觉提示或文本框,提醒读者注意这一非常规做法。If you decide to not start at zero, do so in a way that doesn’t distort the results and consider adding a visual cue or text box to point out the deviation from the norm.

设计元素Design elements

选择类型和度量值并创建视觉对象后,是时候微调外观以达到最佳效果了。Once you’ve selected a type and measure and created the visual, it’s time to fine-tune the display for maximum effectiveness. 本部分介绍了:This section covers:

  • 布局、空间和尺寸Layout, space, and size
  • 文本元素:标签、批注、菜单、标题Text elements: labels, annotations, menus, titles
  • 排序Sorting
  • 可视交互Visual interaction
  • 颜色Color

调整视觉对象,最大限度地利用空间Tweaking visuals for best use of space

如果要尝试在报表中显示多个图表,最大限度地提高数据/墨迹比率将有助于突出显示要传达的数据信息。如上所述,Edward Tufte 首创“数据/墨迹比率”这一概念,即以从图表中删除尽可能多的标记为目标,同时还不影响读者对数据的理解。If you’re trying to fit multiple charts into a report, maximizing your data-ink ratio will help make the story in your data stand out. As mentioned above, Edward Tufte coined ‘data-ink’ ratio: the goal is remove as many marks from a chart as possible without impairing a reader’s ability to interpret the data.

在下面的第一组图表中,有多余的坐标轴标签(“2014 年 1 月”、“2014 年 4 月”等)和标题(“按日期”)。In the first set of charts below, there are redundant axis labels (Jan 2014, Apr 2014 etc.) and titles (“by Date”). 每个图表的标题还需要占用图表中的专用水平空间。The titles for each chart also require dedicated horizontal space across each chart. 通过删除图表标题和启用各个坐标轴标签,我们减少了一些墨迹,更好地利用了整体空间。By removing the chart titles and turning on individual axis labels we remove some ink and have better use of the overall space. 还可以删除前两个图表的坐标轴标签,进一步减少墨迹,为数据腾出更多空间。We can remove the axis labels for the top two charts to further reduce ink and use more of the space for data.

如果你想要突出显示特定时间段,可绘制线条或矩形作为所有图表的背景,这样有助于引导读者上下浏览并比较图表。If there were particular time periods that you wanted to call out, you could draw lines or rectangles behind all the charts to help draw the eye up and down to aid comparisons.

图 24:改进前Figure 24: Before

图 25:改进后Figure 25: After

启用和禁用坐标轴标题的具体操作To turn axis titles on and off

选择视觉对象,使其处于活动状态,然后打开格式窗格。Select the visual to make it active and open the Formatting pane. 展开“X 轴”或“Y 轴”选项,然后将“标题”的滑块拖至“开”或“关”。Expand the options for the X-axis or Y-axis and drag the slider for Title on or off.

图 26:启用和禁用坐标轴标题Figure 26: Turn axis titles on and off

启用和禁用坐标轴标签的具体操作To turn axis labels on and off

选择视觉对象,使其处于活动状态,然后打开格式窗格。Select the visual to make it active and open the Formatting pane. “X 轴”和“Y 轴”旁边为滑块。Next to X-Axis and Y-Axis are sliders. 拖动滑块来启用或禁用坐标轴标签。Drag the slider to turn axis labels on or off.

图 27:启用和禁用坐标轴标签Figure 27: Turn axis labels on and off

提示

如果启用了“数据标签”,可能需要禁用 Y 轴标签。One scenario where you might turn Y-axis labels off would be if you had Data labels turned on.

删除视觉对象标题的具体操作To remove visual titles

选择视觉对象,使其处于活动状态,然后打开格式窗格。Select the visual to make it active and open the Formatting pane. 将“标题”的滑块设置为“关”。Set the slider for Title to Off.

图 28:从视觉对象中删除标题Figure 28: Remove titles from visuals

请考虑读者是如何查看报表的,并确保视觉对象和文本的大小和颜色深浅足以方便读者阅读。Consider how your readers will be viewing the report and ensure your visuals and text are large enough and dark enough to be read. 如果页面上有一个比例较大的视觉对象,读者可能会认为它是最重要的。If you have a proportionally-larger visual on the page, readers may assume it’s the most important. 请在视觉对象之间留有足够的空白区域,让报表看起来整齐有序、易于理解。Put enough space between the visuals that your report doesn’t look cluttered and confusing. 对齐视觉对象有助于引导读者视线。Align your visuals to help direct the eyes of your readers.

调整视觉对象大小的具体操作To resize a visual

选择视觉对象,使其处于活动状态。Select the visual to make it active. 捕捉并拖动其中一个图柄来调整大小。Grab and drag one of the handles to adjust the size.

图 29:调整视觉对象大小Figure 29: Resize visual

移动视觉对象的具体操作To move a visual

选择视觉对象,使其处于活动状态。Select the visual to make it active. 选择并按住视觉对象中间顶部的控制手柄条,将视觉对象拖到新位置上。Select and hold the gripper bar at the top middle of the visual and drag the visual to its new location.

图 30:移动视觉对象Figure 30: Move a visual

可视化效果的标题和标签Titles and labels that are part of the visualizations

请确保标题和标签清晰可辨、直观明了。Ensure titles and labels are readable and self-explanatory. 标题和标签中的文本必须采用最适合的字号,以及可突出显示的颜色(如黑色,而不是默认的灰色)。Text in titles and labels must be an optimal size with colors that stand out (such as black instead of the default grey). 还记得我们的样式指南(见上文中的“文本”)吗?Remember our style guide (see "Text" above)? 请限制颜色和字号的数量。太多不同的字号和颜色会让页面看起来有狭促感,且令人困惑。Limit the number of colors and sizes -- too many different font sizes and colors make the page look busy and confusing. 请考虑对报表页面上所有视觉对象的标题使用相同的字体颜色和字号,并对报表页面上的所有标题使用相同的对齐方式。Consider using the same font color and size for the title of all visuals on a report page and choose the same alignment for all titles on a report page.

格式窗格The formatting pane

若要执行下列各项格式调整,请选择滚动油漆刷图标来打开格式窗格。For each of the formatting adjustments listed below, select the paint roller icon to open the Formatting pane.

图 31:打开格式窗格Figure 31: Open the Formatting pane

然后,选择要调整的视觉对象元素,并确保将其设置为“开”。Then select the visual element to adjust and make sure it is set to On. 可视对象元素示例包括“X 轴”、“Y 轴”、“标题”、“数据标签”和“图例”。Examples of visual elements are: X-Axis, Y-Axis, Title, Data labels, and Legend. 以下示例展示了“标题”元素。The example below shows the Title element.

图 32:设置视觉对象的标题格式Figure 32: Format a visual title

设置字号Set the text size

可调整标题和数据标签的字号,但无法调整 X 轴/Y 轴或图例的字号。Text size can be adjusted for titles and data labels, but not for X or Y axes or legends. 对于数据标签,具体来说,在确定最适合的报表数据细化程度前,可以轻率对待“显示单位”和“小数位数”。For data labels specifically, play with the Display units and number of Decimal Places until you find the optimal level of detail for displaying on your report.

设置文本对齐方式Set the text alignment

标题对齐方式包括左对齐、右对齐和居中对齐。The choices for title alignment are left, right, and center. 请选择一种对齐方式,然后将同样的设置应用于页面上的所有视觉对象。Choose one and apply that same setting to all visuals on the page.

设置文本位置Set the text position

可以调整某些 Y 轴和图例的文本位置。Text position can be adjusted for some Y axes and for the legend. 无论如何选择,请对页面上的其他 Y 轴和其他任何图例执行相同的操作。Whichever you choose, do the same for the other Y axes and any other legend on the page.

设置标题和标签长度Set the title and label length

请调整标题、坐标轴标题、数据标签和图例的长度。Adjust the length of titles, axes titles, data labels, and legends. 如果你决定显示其中任何元素,请调整长度(以及字号),以确保元素不会被截断。If you decide to display any of these elements, adjusting the length (along with text size) ensures that nothing is truncated. 对于“标题”和“图例”,需要设置的是“标题文本”,你可以在其中键入视觉对象上实际显示的标题。For Title and Legend, the setting is Title Text and this is where you type in the actual title that will appear on the visual. 对于“X 轴”和“Y 轴”,需要设置的是“样式”,你可以在其中的下拉列表中进行选择。For X-Axis and Y-Axis, the setting is Style and you select from a dropdown. 对于“数据标签”,需要设置的是“显示单位”和“小数位数”。For Data labels, the settings are Display and Decimal. 使用“显示单位”下拉列表可选择度量单位,包括“百万”、“千”、“无”、“自动”等。使用“小数位数”字段可以指示 Power BI 显示多少位小数。Use the Display dropdown to select the units of measurement: millions, thousands, none, auto, etc. Use the Decimal field to tell Power BI how many decimal places to display.

设置文本颜色Set the text color

可以调整标题、坐标轴和数据标签的文本颜色。Text color can be adjusted for titles, axes, and data labels.

不属于可视化效果的标题和标签Titles and labels that are not part of the visualizations

在本白皮书的前面部分中,我们介绍了如何向报表页面添加文本框。Earlier in this paper we discussed adding text boxes to report pages. 有时,可视化效果的标题不足以传达信息。Sometimes the titles on visualizations aren’t enough to tell the story. 添加文本框可以向报表读者传达其他信息。Add text boxes to communicate additional information to the readers of your reports.
为了防止报表页面看起来太有狭促感或太令人困惑,请使用一致的文本框字体、字号、颜色和对齐方式。To keep your report page from looking too confusing or too busy, be consistent in your use of text box fonts, sizes, colors, and alignment. 若要调整文本框中的文本,请选择文本框调出格式菜单。To make an adjustment to the text in a text box, select the text box to reveal the formatting menu.

图 33:设置文本框中的字体格式Figure 33: Format the font used in a text box

排序Sorting

若要更快速地提供见解,真正简单的方式是设置视觉对象排序。A really simple opportunity to provide faster insight is to set the sorting of visuals. 例如,按升序或降序对条形图中的值进行排序,可快速显示重要的增量信息,而无需占用更多实际空间。For example, sorting bar charts in descending or ascending order based on the value in the bars enables you to quickly show significant incremental information without using more real estate.

若要对图表进行排序,请依次选择图表右上角的省略号(...)和“排序”,然后选择要作为排序依据的字段和排序方向。To sort a chart, select the ellipses (…) in the top right of the chart, select Sort and choose the field you want to sort by and the direction. 有关详细信息,请参阅更改视觉对象的排序方式For more information, see Change how a visual is sorted.

图表交互和相互作用Chart interaction and interplay

Power BI 最具吸引力的功能之一就是,能够修改图表的相互交互方式。One of the most compelling feature of Power BI is the ability to edit the way charts interact with each other. 默认情况下,图表可交叉突出显示。也就是说,在你选择数据点后,其他图表中的相关数据会变亮,而不相关的数据则会变暗。By default, charts are cross-highlighted: when you select a data point, the related data of other charts light up and the unrelated data dims. 可以替换此行为,将任何图表用作真正的筛选器,从而节省页面上的实际空间。You can override this behavior to use any chart as a true filter which saves you real estate on your page. 为此,请选择菜单栏中的“视觉对象交互”。To do this, select Visual Interactions from the menubar.

图 34:视觉对象交互Figure 34: Visual interactions

然后,对于页面上的每个视觉对象,确定要让选定视觉对象进行筛选、突出显示,还是不执行任何操作。Then, for each visual on the page, decide whether you want the selected visual to filter, highlight, or do nothing. 并非所有视觉对象都可以突出显示。对于无法突出显示的视觉对象,突出显示控件将不可用。Not all visuals can be highlighted, and for those the highlight control won't be available. 有关详细信息,请参阅 Power BI 中的视觉对象交互For more information, see Visual interactions in Power BI.

提示

对于刚接触 Power BI 的读者,可能一下子还不知道可以单击报表与之交互。For readers who’re new to Power BI, this ability to click and interact with reports may not be instantly obvious. 请添加文本框,帮助他们了解可以单击哪些对象来获取更多见解。Add text boxes to help them understand what they can click on to find more insights.

视觉对象中使用的颜色The use of color in visuals

在本白皮书的前面部分中,我们介绍了务必要对报表中使用的颜色进行提前规划。Earlier in this paper we talked about the importance of having a plan for how you’re going to use color across a report. 本部分介绍的内容会有一些重复,但主要侧重的还是各个视觉对象中使用的颜色。This section will have some overlap but primarily applies to how you use color in individual visuals. 原则同样适用:使用颜色可以使报表成为一个整体,并能突出显示重要数据,以及促进读者对视觉对象的理解。And the same principles apply: use color to tie the report together, add emphasis to important data, and to improve the reader’s comprehension of the visual. 太多不同的颜色会分散读者的注意力,让读者不知道该从何处开始看起。Too many different colors is distracting and makes it difficult for the reader to know where to look. 不要为了追求美观而牺牲读者对信息的理解。Don’t sacrifice comprehension for beauty. 只添加可促进理解的颜色。Only add color if it improves comprehension.

提示

了解受众和颜色内在的固有含义规则。Know your audience and any inherent color rules. 例如,在美国,绿色通常表示“好”,红色通常表示“不好”。For example, in the United States, green typically means “good” and red typically means “not good”.

本主题分为:This topic is broken down to cover:

  1. 数据颜色Data color
  2. 数据标签颜色Data label color
  3. 分类值的颜色Color for categorical values
  4. 数字值的颜色Color for numerical values

使用颜色突出显示读者感兴趣的数据Use colors to highlight interesting data

使用颜色的最简单方法是,更改一个或多个数据点的颜色来吸引读者注意力。The simplest way to use color is by changing one or more data point’s color to call attention to it. 在下面的示例中,4 年一届的夏季奥运会和 2 年一届的冬季奥运会的颜色不同。In this example, the color changes when the Olympic games moved from a 4-year cycle to a 2-year cycle of alternating Summer and Winter games.

图 35:使用颜色传达信息Figure 35: Use color to tell a story

可以在格式窗格的“数据颜色”选项卡中更改数据点颜色。You can change data point colors from the Data colors tab in the formatting pane. 若要单独自定义各个数据点,请务必将“全部显示”设置为“开”。To customize each data point individually, make sure Show all is set to On.

图 36:设置数据点颜色Figure 36: Set data point colors

备注

Power BI 对报表视觉对象应用默认主题。Power BI applies a default theme to your report visuals. 已选择的主题颜色可以确保多样性和对比度。The theme colors have been chosen to provide variety and contrast. 若不想使用默认主题调色板,请选择“自定义颜色”。To divert from the default theme palette, select Custom color.

图 37:选择自定义颜色Figure 37: Choose a custom color

在 Power BI Desktop 中,你甚至可以使用第二个序列突出显示离群值或一部分线条:In Power BI Desktop, you can even highlight outliers or a section of a line by using a second series:

图 38:使用 Desktop 绘制离群值Figure 38: Using Desktop to plot outliers

其中,只有当平均 8 月温度低于 60,“离群值”序列中才有值。Here, values in the ‘Outliers’ series only exist where the average August temperature drops below 60. 为此,请使用以下公式创建 DAX 计算列:This was done by creating a DAX calculated column using this formula:

离群值 = if(Editions[Temp]<60, Editions[Temp], BLANK())Outliers = if(Editions[Temp]<60, Editions[Temp], BLANK())

在我们的示例中,有 3 个离群值:1952、1956 和 2000。In our example, there were 3 outliers: 1952, 1956, and 2000.

标签和标题的颜色Colors for labels and titles

浏览所有可用的格式选项后,你会发现可以为许多不同对象的标题和图例设置颜色。As you explore all the formatting options available to you, you’ll find many different places to add color to titles and legends. 例如,你可以更改数据标签和坐标轴标题的颜色。For example, you can change the color of data labels and axes titles. 请谨慎操作。Proceed with caution. 通常情况下,不妨对所有视觉对象标题使用同一种颜色。Generally, you want to use a single color for all visual titles. 与本白皮书中的所有准则一样,总会遇到要“违反规则”的情形和原因。不过,如果你决定要违反规则,请给出令人信服的理由。As with all the guidelines in this paper, there are always situations and reasons to “break the rules”, but if you do decide to break the rules, do it for a good reason.

分类值的颜色Colors for categorical values

包含序列的图表通常图例中有分类值。Charts with a series typically have a categorical value in the legend. 例如,以下图例中的每种颜色分别代表不同类别的国家/地区。For example, each color in the legend below represents a different category of Country/Region.

图 39:应用了默认颜色Figure 39: Default colors applied

Power BI 默认使用的颜色可以很好地区分分类值,以便读者可以轻松区分。The colors Power BI uses by default were chosen to provide a good color separation between categorical values so they are easy to distinguish. 有时,为了与企业架构匹配等原因,有人会更改这些颜色,但这样做可能会导致问题出现。Sometimes people change these colors to match their corporate scheme etc. but it can lead to problems.

图 40:应用了一种颜色的不同色调Figure 40: Color applied as hues of a single color

此视觉对象只使用颜色浓度不同的一种色调,这会让读者误以为分类之间存在排序关系。By sticking to a single hue and varying the intensity of the color, this visual has introduced a false sense of ordering between the categories. 它会暗示深色调气泡在某方面高于或低于浅色调气泡。It implies the darker bubbles are higher or lower on some scale than the lighter hues. 与按字母顺序排序不同,这种分类值通常没有固有的排序顺序。Other than alphabetical, there’s normally no inherent order in this sort of categorical value. 若要更改默认颜色,请打开格式窗格,然后选择“数据颜色”。To change the default colors, open the Formatting pane, and select Data colors.

数字值的颜色Colors for numerical values

对于确实存在某种固有顺序的数值字段,你也可以按值对数据点进行着色。For fields that do have some inherent order and numerical value, you can also color data points by the value. 这样做有助于显示数据中值的分散情况,并能在一个图表上显示两个变量。This can be helpful to show the spread of values across the data, and also allow for two variables to be shown on a single chart. 例如,以下图表明确指出,尽管中国的奖牌数最多,但日本和泰国参加奥运会的次数更多。For example this chart makes it clear that although China has the highest medal count, Japan and Thailand have participated in more Olympic games.

图 41:按值对数据点进行着色Figure 41: Color data points by the value

若要创建此图表,请在“颜色饱和度”字段中添加值,然后在格式窗格中调整这些颜色。To create this chart, add a value to the Color saturation field and then adjust those colors in the Formatting pane.

图 42:在“颜色饱和度”字段中添加值Figure 42: Add a color saturation field

图 43:调整对饱和度使用的颜色Figure 43: Adjust the colors used for saturation

此外,还可以使用颜色来强调与中间值的偏差。Color can also be used to emphasize variance around a central value. 例如,将正值设置为绿色,将负值设置为红色。For example, coloring positive values green and negative values red. 为正值或负值设置颜色时,请注意文化差异;并非在所有文化中,红色都表示“不好”,而绿色都表示“好”!Be aware of cultural differences when assigning colors to positive or negative values; not all cultures use red for bad and green for good!

图 44:强调与中间值偏差的着色Figure 44: Color to emphasize variance around central value

可视对象设计原则 - 应用于示例报表页面Principles of visual design – applied to example report page

现在,让我们将上文所述的可视对象设计原则应用于我们的示例报表。Now let’s take the visual principles discussed above and apply them to our sample report.

改进前Before

图 45:示例报表(改进前)Figure 45: Our example report (before)

改进后After

图 46:示例报表(改进后)Figure 46: Our example report (after)

我们做了哪些改进?What did we do?

  1. 切片器:通过添加页面级别筛选器,并且只选择了金牌、银牌、铜牌,从切片器中删除了“空白”选项。Slicer: removed blanks from the slicers by adding a page level filter and selecting only gold, silver, bronze. 对于“单选”和“全选”,将“选择控件”更改为“关”。Changed Selection Controls to Off for Single Select and Select All.
  2. 气泡图:图例项过多,屏幕无法显示全。Bubble: there are so many items in the legend that they scroll off the screen. 删除了图例,改为启用了“类别标签”。Removed the legend and turned on Category labels instead. 客户可以将鼠标悬停在气泡之上查看详细信息。Customers can hover over the bubbles to see the details. 缩短了标题并删除了“按国家/地区”,因为这一点显而易见。Shortened the title and removed “by countryregion” since that seems self-evident. 为 X 轴和 Y 轴启用了坐标轴标签,让图表更易于理解。Turned axes labels On for both to make the chart easier to understand.
  3. 着色地图:更改了“数据颜色”,使其更加突出。Filled map: changed the Data colors to make it stand out more. 启用了“散射”,并将“最小”设置为粉色,将“最大”设置为红色。Turned Diverging on and set the Minimum to pink and the Maximum to red.
  4. 树状图:删除了仅为美国设置的筛选器。Tree map: removed filter which was set for only USA. 将“数据标签”设置为显示 1 位小数。Set the Data labels to 1 decimal place. 可视对象使用的等级字段并不十分有用,因为它几乎始终都显示 33%(金牌/银牌/铜牌)。The visual was using the Class field which isn’t very useful since it will almost always be 33% (Gold/Silver/Bronze). 选择了读者更感兴趣的其他字段,即性别字段。Selected a different more-interesting field, gender. 出于设计目的,将“水上运动”更改为蓝色,将“田径运动”更改为灰色。Changed Aquatics to blue and Athletics to grey for design.
  5. 顶部条形图:缩短了标题,删除了数据标签,禁用了图例标题。Top bar chart: shortened the title, removed data labels, turned legend title off. 为了与下面的图表匹配,更改了标题的字词顺序。Changed word order of title to match the chart below.
  6. 底部条形图:为了与上面的图表匹配,按年份进行升序排序。Bottom bar chart: sorted by year ascending to match chart above. 更改了颜色以匹配等级。Changed colors to match class. 更改了标题。Changed title. 禁用了图例,为数据腾出更多空间。Turned off legend for more space for data. 启用了不会在报表中显示的数据标签(因为视觉对象过小,导致标签无法辨识),但当视觉对象在焦点模式下打开时数据标签会显示。Turned on data labels which won't show up in the report (because the visual is too small for the labels to be readable) but will show when the visual is opened in Focus mode. 了解焦点模式Learn about Focus mode. 在“工具提示”中添加了“比赛计数(非重复)”,因此现在如果将鼠标悬停在堆积柱形图之上,工具提示还会提示相应年份有多少比赛。Added Count of Event (Distinct) to Tooltips so now when you hover over a stacked column, the tooltips also tell you how many events were contested that year.
  7. 视觉对象交互:对两张卡片禁用了交互,因为我想一直显示奥运会总届数和总比赛数。Visual Interactions: turned off interactions for both cards since I always want them to show total games and sports.

视觉对象类型和最佳做法Visual types and best practices

Power BI 在本地提供许多视觉对象类型。Power BI provides many visual types natively. 可以添加 Microsoft 和 Power BI 社区中提供的自定义视觉对象。本白皮书并未收录全部的视觉对象选项,因为太多了。To these, add the custom visuals available from Microsoft and from the Power BI community and total visual options become too numerous to document here. 不过,我们将了解其中一些最常用的本地视觉对象类型。But let’s look at some of the most-used native visual types.

折线图Line charts

折线图是用于呈现一段时间内数据变化的一种强大方式。Line charts are a powerful way to look at data over time. 实际上,表中数据无法让读者快速扫视峰值、谷值、周期和模式。Looking at data in tables doesn’t really take advantage of the speed in which our eyes spot peaks, valleys, cycles, and patterns.
以下示例展示了获得的奖牌数和赢得这些奖牌的运动员人数的变化趋势。The example below shows the trends in the number of medals awarded and the number of athletes winning those medals.

图 47:折线图Figure 47: Line charts

最佳做法Best practices

  • 查看折线图时,读者首先会注意到曲线形状。When people look at line charts, the first thing they see is the shape of the curve. 也就是说,你需要设置让曲线有意义的 X 轴,如时间或分布类别。This means that you need to have an x-axis that makes the curve meaningful such a time or distribution categories. 如果在 X 轴上设置产品或地理位置等分类字段,折线图就不引人入胜,因为曲线形状未提供任何有意义的信息。If you put categorical fields like product or geography on the x-axis, the line chart will not be interesting as the shape of the curve would provide no meaningful information.
  • 如果你选择像这样竖放多个图表(这样更易于跨序列进行比较),使 X 轴排成一行。If you choose to place multiple charts above and below each other like this, to make it easier to compare across series, line up the X-axis. 使用筛选器来确保显示相同范围的值。Use filters to make sure that the same range of values is shown. 例如,如果要显示日期范围,请确保采用相同的日期范围。For example, if you’re looking at date ranges, ensure they are the same date ranges. 两个示例图表的日期范围均为“1896 年到 2012 年”。For example, 1896 to 2012 on both charts.
  • 请充分利用空间。Make full use of the space. 如果可以的话,请设置 Y 轴的起点和终点,在图表的顶部和底部不留空白区域,从而聚焦实际数据点。If it makes sense for your data, set the start and end points for the Y-axis to eliminate empty space at the top and bottom of your chart and to focus in on the actual data points. 为此,请选择滚动油漆刷图标,打开格式窗格。To do this, select the paint roller icon to open the Formatting pane. 展开“Y 轴”区域,然后设置“起点”和“终点”。Expand the Y-Axis area and set the Start and End points.

    图 48:设置起点和终点Figure 48: Set the start and end points

  • 明确设置起点和终点的另一个原因是,需要通过相同的 Y 轴字段比较同一页面上的两个或多个图表。Another reason to explicitly set the Start and End points is if you’re comparing two or more charts on the same page using the same Y-axis field. 例如,如果显示的是累积比赛计数,英国的计数范围介于 1 到 70,而澳大利亚的计数范围介于 1 到 12,那么这两个折线图将显示截然不同的 Y 轴(图 x)。For example, if you’re looking at cumulative event counts, and the United Kingdom has counts that range from 1 to 70 and Australia has counts that range from 1 to 12, the 2 line charts will display very different Y-axes (Figure x). 这样一来,就很难一目了然地进行比较。This makes it difficult to compare at a glance. 请将图表设置为改用相同的 Y 轴范围(图 x)。Instead, set the charts to use the same Y-axis range (Figure x).

    图 49:Y 轴不同的折线图Figure 49:Line charts with different y-axes

    图 50:Y 轴相同的折线图Figure 50:Line charts with matching y-axes

有关详细信息,请参阅:For more information, see:

条形图/柱形图Bar/Column Charts

如果说折线图是用于呈现一段时间内数据变化的标准图表,那么条形图就是用于呈现不同类别的具体值的标准图表。If line charts are the standard for looking at data over time, bar charts are the standard for looking at a specific value across different categories. 如果按数值对条形图进行排序,可立即了解最高值和分布。If you sort the bars based on the number, you will instantly see the top values and distribution. 水平条形图可以与较长的标签很好地搭配使用。Horizontal bar charts work well with long-ish labels.

图 51:水平条形图Figure 51: Horizontal bar chart

最佳做法Best practices

  • 请显示值的数据标签。Display data labels for values. 这样更易于标识特定值。This makes it easier to identify specific values. 为此,请打开格式窗格,然后将“数据标签”设置为“开”。To do this, open the Formatting pane, and set Data labels to On.

    图 52:启用数据标签Figure 52: Turn on data labels

  • 上述条形图非常适用于在一个时间点比较一个度量值与多个度量值。The bar chart above is really useful to compare one measure against many at a single point in time. 上述折线图展示了一段时间内的数据变化,而上述条形图则展示了一个类别在特定时间点的变化趋势。While the line chart above showed us the trend over time, the bar chart shows us the trend for a single category at a specific point in time. 在条形图中,我们一眼就会发现西班牙是世界上失业率最高的国家之一,其失业率高达 25%。At a glance, our bar chart shows us Spain has one of the worst unemployment rates in the world, at 25%.
  • 如果所分配的空间不够显示整个条形图/柱形图,Power BI 会添加滚动条。When an entire Bar/Column chart doesn’t fit into the allotted space, Power BI adds scrollbars. 如果可以,尽量生成能够显示整个图表的视觉对象和报表,以便读者可以概览整个分布。When possible, and if it makes sense, structure the visual and report to show the entire chart so the reader gets an overview of the entire distribution. 遗憾的是,鉴于全世界有太多的国家/地区,我们的示例还是需要使用滚动条。Unfortunately this is not possible in our example given the significant number of countries around the world.

    一种限制所包含的值的方法是使用筛选器。One way to limit the values included is to use a filter. 例如,添加视觉对象级别筛选器,仅显示失业率高于 20% 的国家/地区。For example, add a Visual level filter that shows the country only if unemployment rate is above 20%.

  • 可以向下钻取条形图/柱形图(然后重新备份)。Bar/Column charts can be drilled down (and back up again). 这种方式可以在视觉对象中显示更多信息,而不额外占用实际空间。This is a great way to pack more information into a visual without taking up more real estate. 以下示例采用了“地区 > 国家”层次结构。The example below has a hierarchy for Regions > Countries. 双击地区条可以向下钻取到该地区内的各个国家。Double-clicking a region bar drills down to the countries that make up that region. 有关钻取的详细信息,请参阅在可视化效果中向下钻取For more information on drill, see Drill down in a visualization.

    图 53:向下钻取Figure 53: Drill down

如需了解条形图和柱形图的更多详情,请参阅:For more details on Bar and Column charts:

堆积条形图/柱形图Stacked Bar/Column Charts

通过在条形图或柱形图中堆积不同的类别,可以在条形图/柱形图中添加其他维度。Add another dimension to your bar/column charts by stacking different categories within the bar or column. 现在,图表既可呈现一种总体趋势(以高度/长度为依据),还可以显示各个类别对该趋势的影响。Now the chart conveys information about one overall trend (based on height/length) but also shows the influence of the categories on that trend. 下面的图表展示了 2014 年收入超过 60 亿的顶级足球队的整体增长情况。The chart below shows the overall growth of Top soccer team revenue above 6 billion in 2014.

图 54:堆积柱形图Figure 54: Stacked column chart

此堆积柱形图显示总收入随着时间的推移不断增长,而且商业和广播类别收入也随着时间的推移稳定增长,使得总收入不断增长。This stacked column chart shows us that total revenue is growing over time and that the Commercial and the Broadcasting categories are increasing steadily over time – contributing to overall revenue increase. 不过,此图表难以比较 3 个类别的相互影响。But this chart doesn’t make it easy to compare the impact each of the 3 categories has on each other. 例如,商业收入增长相比广播或比赛日的收入增长如何?For example, how does the growth of Commercial compare to the growth of Broadcasting or Match Day? 最好使用折线图或将折线图用作伴随视觉对象来呈现此数据。A better choice for this data, or a companion visual for this data, would be a line chart.

图 55:转换成折线图Figure 55: Convert to a line chart

在此折线图中,更容易看出商业收入增长的幅度最大,随后是广播和比赛日收入增长。In this line chart it is easier to see how commercial revenue has grown the most followed by broadcast and match day.

最佳做法Best practices

  • 与柱形图/条形图一样,可以视情况选择水平显示或垂直显示。As with columns/bars, you have the option of horizontal or vertical display. 如果有长标签,最好选择水平显示;如果有时序数据,最好选择垂直显示。Horizontal is a better choice if you have long labels and vertical if you have time series data.
  • 如果要呈现一段时间内的变化趋势和其他变化模式,请避免使用堆积条形图/柱形图。Avoid stacked Bar/Column charts if you want to show trends and other patterns of change over time. 其他图表(如折线图)的效果更好。Other charts, like Line charts, do a much better job.
  • 还可以让分布以总量或占总数的百分比为依据。You can also have the distribution based on total volume or as a % of total.
  • 少数人指出, 难以比较堆积条形图的各段。如果各段并排显示,且所有段的基线相同,则可以轻松比较段的高度。不过,如果各段相互堆积,就难以比较了。此外,尽管(收入)的每月变化情况相当显而易见,但(收入)在其他(类别)中的变化情况则很难看出。As Few noted it is difficult to compare the segments of a stacked bar. If the segments were arranged side-by-side and all grew upwards from the same baseline, it would be easy to compare their heights, but when stacked upon one another, the task becomes hard. Plus, although it’s fairly easy to see how (revenue) changed from month to month it is quite difficult to see how (revenue) in the other (categories) changed.
  • 如果总和为 100,最好使用百分比堆积图。100% Stacked charts are a good choice when using percentages that add up to 100. 在以下示例中,我们看到的是按球队划分的类别分布。In the example below, we see the category distribution by team. 百分比是相对的,以便我们能够一眼看出模式来。The percentages are relative and allows us to, at a glance, see patterns. 例如,Everton 的收入主要来自广播(超过 70%),而 PSG 的广播收入占比仅为 20%。For example, Everton’s revenue comes primarily from Broadcasting (over 70%) while PSG only derives 20% of its revenue from Broadcasting. 选择水平显示更易于适应球队标签显示和了解收入类型的影响。The choice of a horizontal display makes it easier to fit the team labels and to see the impact of revenue type.

    图 56:水平堆积图Figure 56: Horizontal stacked chart

有关堆积图的详细信息,请参阅:For more information on stacked charts:

组合条形图/柱形图Combo Bar/Column Charts

在 Power BI 中,可以将柱形图和折线图合并到组合图中。In Power BI, you can combine column and line charts into a combo chart. 可以选择生成折线图和堆积柱形图,以及折线图和簇状柱形图。The choices are: Line and Stacked Column chart and Line and Clustered Column chart. 将两个单独的视觉对象合并为一个,可以节省宝贵的画布空间。Save valuable canvas space by combining two separate visuals into one.

下面的两个屏幕截图展示了合并前后的情况。The two screenshots below show a before and after. 第一个屏幕截图中有两个单独的视觉对象,分别是呈现一段时间内人口变化情况的柱形图,以及呈现一段时间内 GDP 变化情况的折线图。The first page has two separate visuals: a Column chart showing population over time and a Line chart showing GDP over time. 这两个图表非常适合合并到组合图中,因为它们的 X 轴(年)和值(2002 年到 2012 年)均相同。These charts are a good candidate for a Combo chart because they have the same X-Axis (year) and values (2002 through 2012). 为什么不合并这两个图表呢?这样一来,就可以在一个视觉对象上比较这两大趋势了。Why not combine them to compare these 2 trends on a single visual? 合并这两个图表后,可以更快速地比较数据。Combining these 2 charts lets you make a quicker comparison of the data.

新的报表页面上有一个视觉对象,即折线图和堆积柱形图的组合图。The new report page has a single visual: a line and stacked column chart. 我们可以同样轻松地创建折线图和簇状柱形图的组合图。We could’ve just as easily created a line and clustered column chart. 现在,两种趋势之间的关系更加显而易见。It’s now easier to look for a relationship between the two trends. 我们可以看出,2008 年前,人口和 GDP 的增长趋势类似。We can see that up until 2008, population and GDP followed a similar trend. 但从 2009 年开始,人口增长变缓,GDP 更加多变。But starting in 2009, as population growth flattened, GDP was more volatile.

图 57:两个单独的图表Figure 57: As two separate charts

图 58:一个组合图Figure 58: As a single combo chart

最佳做法Best practices

当两个视觉对象至少有一个坐标轴相同时,组合图的效果最佳。Combo charts work best when both visuals have at least one axis in common.

看看你的坐标轴吧!Watch your axes! 你的组合图是否易于阅读和理解?Is your Combo chart easy to read and interpret? 是否使用不同的范围和值?Or does it use dissimilar ranges and values? 例如,如果柱形图的 Y 轴比例比折线图的 Y 轴比例小得多,组合图便毫无意义。For example, if the scale of the column chart’s Y-Axis is much smaller than the scale of the line chart’s Y-Axis, your combo chart won’t be meaningful. 例如,请注意底部的第三条线(水绿色)。For example, notice the third line (aqua color) way down at the bottom.

图 59:不成功的折线图Figure 59: An unsuccessful line chart

同样,如果柱形图和折线图使用 2 个不同的度量值,而且你也没有创建双轴,那么组合图也将毫无意义。So too, your combo chart won’t be meaningful if your column chart and line chart use 2 different measures and you don’t create dual axes. 例如,美元与百分比。For example, dollars versus percent. 请务必添加双轴,这样有助于读者理解图表,同时还请考虑添加坐标轴标签。Be sure to include both axes to help the reader understand the chart and consider adding axes labels as well.

为此,请打开格式窗格,展开“Y 轴”选项,然后将“显示次级内容”设置为“开”(如果尚未启用的话)。To do this, open the Formatting pane, expand Y-Axis and set Show Secondary to On (if it isn’t already on). 此设置有时很难找到。请展开“Y 轴(列)”,然后向下滚动,直到看到“显示次坐标轴”为止。This setting is sometimes difficult to find; expand Y-Axis (Column) and scroll down until you see Show secondary. 此外,还请将“Y 轴(列)”的“标题”设置为“开”,并将“Y 轴(行)”的“标题”设置为“开”。Also, set the Y-Axis (Column) Title to On and set the Y-Axis (Line) Title to On.

图 60:显示次坐标轴Figure 60: Show secondary axis

图 61:改为创建组合图Figure 61: Create a combo chart instead

  • 请充分利用双轴。Take advantage of dual axes. 它可用于比较值范围不同的多个度量值。It’s a great way to compare multiple measures with different value ranges. 还可用于阐释一个视觉对象中两个度量值之间的关联。And it’s a great way to illustrate the correlation between two measures in one visual.

有关详细信息,请参阅:For more information:

散点图Scatter Chart

有时,我们希望能够同时看到多个变量,而散点图就非常实用,可方便你同时看到所有变量。Sometimes we have many variables that we want to see together, and a scatter chart can be a very useful way to get an overall picture. 散点图显示 2 个(散点)或 3 个(气泡)定量度量值之间的关系。Scatter charts display relationships between 2 (Scatter) or 3 (Bubble) quantitative measures. 散点图始终具有两个数值轴以显示水平轴上的一组数值数据和垂直轴上的另一组数值数据。A scatter chart always has two value axes to show one set of numerical data along a horizontal axis and another set of numerical values along a vertical axis. 图表在 x 和 y 数值的交叉处显示点,将这些值单独合并到各个数据点。The chart displays points at the intersection of an x and y numerical value, combining these values into single data points. 根据数据,这些数据点可能均衡或不均衡地分布在水平轴上。These data points may be distributed evenly or unevenly across the horizontal axis, depending on the data.

气泡图将数据点替换为气泡,用气泡大小表示数据的其他维度。A bubble chart replaces the data points with bubbles, with the bubble size representing an additional dimension of the data.

以下气泡图着眼于南美,按南美的各个国家/地区比较人均 GDP(Y 轴)、GDP 总值(X 轴)和人口。The bubble chart below looks at South America and compares GDP per capita (Y-Axis) sum of GDP (X-Axis) and population by South American country. 气泡大小表示相应国家/地区的总人口。The size of the bubbles represents total population for that country. 巴西人口最多(气泡最大),在南美 GDP 中所占的份额也最大(位于 X 轴最远端)。Brazil has the largest population (bubble size) and the largest share of South America’s GDP (it is farthest along on the X-Axis). 不过,请注意,乌拉圭、智利和阿根廷的人均 GDP 高于(在 Y 轴上的位置远于)巴西。But notice that GDP per capita for Uruguay, Chile, and Argentina is higher than Brazil (farther up on the Y-Axis).

图 62:显示南美 GDP 和人口的气泡图Figure 62: South America GDP and population as a bubble chart

如果添加播放轴,你就可以假装自己是 Hans Rosling,呈现数据在一段时间内的变化情况 (https://www.youtube.com/watch?v=PbaDBJWCeD4)。If you add a play axis, you can pretend you are Hans Rosling and tell the story over time (https://www.youtube.com/watch?v=PbaDBJWCeD4). 若要添加播放轴,请将日期时间字段也拖到“播放轴”中。To add a play axis, drag a datetime field into the Play Axis well.

最佳做法Best practices

  • 散点图和气泡图是很好的信息传达方式。Scatter and Bubble charts are great storytellers. 不过,若要浏览数据,便会发现这两种图表并不实用。But they are not as useful when trying to explore data. Stephen Few 在下面的段落中指出了这一点:此方法的优势在于传达信息。Rosling 讲述了在气泡移动和值变化时图表中所发生的情况,同时指向他希望我们看到的内容时,让信息成为动态信息。不过,当我们自己浏览和理解数据时,就会发现动态气泡图的效果不太好。我怀疑虽然 Rosling 使用这种方法发现信息,但传达的只是已知信息。我们一次顾不了多个气泡,因为它们在移动,因此我们不得不反复播放动画,试图了解所发生的情况。我们可以向选定气泡添加痕迹,以便能够查看这些气泡的完整路径。不过,如果对多个气泡使用痕迹,图表很快就会变得太杂乱了。从根本上讲,我要表达的意思是,这不是显示信息以供浏览和分析的最佳方式。This is what Stephen Few points out in the paragraph below The strength of this approach is when it’s used to tell a story. When Rosling narrates what’s happening in the chart as the bubbles move around and change in value, pointing to what he wants us to see, the information comes alive. Animated bubble charts, however, are much less effective for exploring and making sense of data on our own. I doubt that Rosling uses this method to discover the stories, but only to tell them once they’re known. We can’t attend more than one bubble at once as they’re moving around, so we’re forced to run the animation over and over to try to get a sense of what’s going on. We can add trails to selected bubbles, which make it possible to review the full path these bubble have taken, but if trails are used for more than a few bubbles the chart will quickly become too cluttered. Essentially, what I’m pointing out is that this is not the best way to display this information for exploration and analysis.
  • 添加 X 轴和 Y 轴标签可有助于传达信息。Add X and Y axes labels to help tell the story. 尤其是在使用气泡图的情况下,其中有多个组件起作用,标签有助于读者理解视觉对象。Especially with bubble charts, there are many components at play and labels help readers understand the visual.
  • 添加数据标签,让视觉对象更易于理解。Add data labels to make the visual easier to interpret. 尤其是在使用气泡图的情况下,当有多个图例项时,可能很难区分相似的颜色。Especially with bubble charts, when you have many items in the Legend, it may be difficult to distinguish between similar colors. 在上述视觉对象中,苏里南、哥伦比亚和厄瓜多尔的图例颜色就非常相似。In the visual above, the legend colors for Suriname, Columbia, and Ecuador are very similar.
  • 你创建的散点图中是否只有一个聚合了 X 轴和 Y 轴上所有值的数据点?Did you create a scatter chart and see only one data point that aggregates all the values on the X and Y axes? 或者,你的图表是否聚合了一条横线或竖线上的所有值?Or, your chart aggregates all the values along a single horizontal or vertical line? 若要解决此问题,请将字段添加到“详细信息”区域,指示 Power BI 如何对值进行分组。To fix this, add a field to the Details area to tell Power BI how to group the values. 每个要绘制的点必须具有唯一的字段。The field must be unique for each point you want to plot. 若要获取帮助,请参阅 Power BI 散点图和气泡图教程For help, refer to the Power BI scatter and bubble chart tutorial.

树状图Tree Map Charts

树状图可能非常有用,可便于你概览一个整体中不同组成部分的相对大小,尤其是当你按类别对它们进行分组时。Tree maps can be very useful for giving a good overview of the relative size of different components that make up a whole -- especially when you can group them by categories. 每当我尝试理解新业务时,都会创建包含主要组成部分的树状图。此图表非常有用,方便我了解总体分布情况。Any time I try to understand a new business, having a tree map of the main components can be very useful in knowing the overall distribution.

在下面的第一个图表中,显而易见的是,巴西约占南美 GDP 的一半,委内瑞拉和阿根廷的 GDP 大致相同。In the first chart below, you can see right away that Brazil makes up approximately half of South America’s GDP and that Venezuela and Argentina are roughly the same size.

如果你想扩大上下文范围,但仍想了解占比排名前几的国家/地区,可以创建在地区内嵌套类别成员(国家/地区)的视觉对象层次结构。If you want to have broader context and still have an idea of the impact of the top contributing countries, you can create visual hierarchies with category members (countries) nested inside regions. 第二个树状图有助于我们了解地区的相对大小(首要信息),然后了解每个地区内占比排名前几的国家。The second tree map gives us an idea, first and foremost, of the relative size of the regions and then, within each region, we can see which individual countries contribute the most. 我们可以看出有三个非常大的地区(欧洲、亚洲和北美),并能轻松了解每个地区内占比排名前几的国家。We see that there are three massive regions (Europe, Asia & North America) and within those we can easily see the top countries/regions.

树状图的主要限制是,除了靠前的矩形之外,可比较的不同矩形有限。The main limitation of a tree map is the limited ability to compare the different rectangles beyond the top ones. 此图表非常适合信息概览,但如果要更精确地了解不同组成部分的相对大小,柱形图和条形图的效果可能更好。It is a good chart for an overview but column and bar chart are probably a better choice to have more precise idea of the relative size of different components.  例如,第一个树状图概述了 GDP 大小排序,但读者很难了解国家之间的具体差异,尤其是当遇到较小的未标记框时。  For example, the first tree map gives a broad indication of the order of the GDP size, but it’s hard to identify specific differences between countries, particularly the smaller unlabeled boxes. 对于此数据,若要比较一个分组,条形图或柱形图的效果可能更好。For this data, where a single grouping is compared, a bar or column chart might be a better choice.

图 63:比较南美 GDP 的树状图Figure 63: South America GDP comparison as a tree map

在此图表中,我们还添加了一个级别的数据,即地区。我们可以了解各地区在 GDP 总值中的占比,以及每个地区内的各国家/地区在 GDP 总值中的占比。Here we’ve added another level of data, region, and we can see the overall contribution to GDP by regions, as well as the relative impact within the regions. 请务必使用非求和度量值(如平均值),因为汇总详细信息可能无法反映聚合一级的实际值。Beware that doing this with non-summative measure (such as averages) that the sum of the details might not represent the actual value at the aggregate level.

图 64:按地区和国家显示 GDP 的树状图Figure 64: GDP by region and country as a tree map

有关树状图的详细信息,请单击以下链接。For more information on tree maps, feel free to click on links below.

其他图表Other charts

饼图或环形图Pie or Donut Charts

一般情况下,条形图/柱形图/折线图可满足大多数需求。In general, bar/column/line charts will serve most purposes. 这很好理解,因为饼图和环形图很难正确理解,事实上这两种图表经常会歪曲数据。It’s well understood that pie and donut charts are difficult for humans to interpret correctly, and in fact can often distort data. 请尽量避免使用这两种图表。Avoid them where possible. Stephen Few 在《把饼图留给甜点》(www.percetualedge.com/articles/08-21-07.pdf) 中精彩介绍了饼图的发展历史和危害Stephen Few has an excellent write up on the history and dangers in [Save the Pies for Dessert](www.percetualedge.com/articles/08-21-07.pdf

他确实有一次提及到饼图在比较部分与整体关系时非常有用。He does explain the one time where pie charts can be useful, when comparing part-to-whole relationships. 但即使是这一点也强不到哪里去。例如,与百分比堆积条形图相比。But even this is rarely significantly-better than, say, a 100% stacked bar chart.

Darkhorse Analytics 站点上发布了另一篇有关饼图的有趣文章(和动画)。Another fun article (and animation) about pie charts can be found on the Darkhorse Analytics site.

或者,了解一下截然相反的观点(《为什么 Tufte 对饼图的看法完全错误》Or read an opposing point of view, Why Tufte is flat-out wrong about pie charts

径向仪表和 KPIRadial Gauges & KPIs

径向仪表是适合指示目标完成比例的视觉对象,常用于执行仪表板。Radial gauges seem like a good visual for indicating performance against a target, and they are very popular in executive dashboards. 但存在两个方面的缺陷。However, they suffer in two main ways. 与饼图一样,在对比完整 180 度弧线或目标线的情况下很难理解阴影区域的角度。As with pie charts, it’s difficult to interpret the angle of the shaded area compared to the full 180 degree arc or target line. 此外,径向仪表占用的空间大,但却只显示了一个度量值。It also uses a lot of space to show a single metric.

可以改为选择简单的 KPI 视觉对象A good alternative is a simple KPI visual

KPI 占用的空间相同,但却显示了值、状态、目标、与目标的偏差、趋势。KPIs show the value, status, goal, variance from the goal and trend in the same amount of space. 如果达不到目标,绿色会变成红色;如果达到某中间目标,绿色会变成黄色。The green coloring turns red if the target isn’t being met and can be yellow if some intermediate target is hit. 与仪表相比,它更易于阅读和理解。It’s much simpler to read and interpret than the gauge.

有关详细信息,请参阅:For more information, see:

结论Conclusion

现在,是时候验证这些最佳做法了。Now it’s time for you to put these best practices to the test. 请与我们保持联系,分享你自己的最佳做法。Keep in touch and share your own best practices. 不同意我们的建议,或有令人信服的理由来“违反规则”?Don’t agree with our recommendations or found a great reason to “break the rules?” 我们也很想听听你的这些想法。We’d love to hear about those as well.

书籍推荐Book recommendations

现今有很多非常好的书籍可以帮助团队研究可视对象设计技术。There are many good books available today to help teams bone up on visual design techniques. Stephen Few 的《信息仪表板设计》 一书是必读的。Stephen Few’s Information Dashboard Design book is a must-read. 他在其他两本书(《向我展示数据》和《现在你明白了》)中更深入地进行了探究。He delves into greater detail in two other books, Show Me the Numbers and Now You See It. Few 和其他作者均从 Edward R. Tufte 身上汲取灵感。Tufte 的《定量信息的视觉显示》被视为该领域的经典之作。Few and others have drawn inspiration from Edward R. Tufte, whose book The Visual Display of Quantitative Information is considered a classic in the field. 此外,Tufte 还编写了《视觉解释》、《构想信息》和《美丽的证据》。Tufte has also written Visual Explanations, Envisioning Information, and Beautiful Evidence. Andy Kirk 的新书 数据可视化效果:数据驱动设计手册》也是不错的选择。Andy Kirk’s new book Data Visualization: A Handbook for Data Driven Design is another great option. 我们还推荐了其他一些作者,包括 Lachlan James、William McKnight、Boris Evelson (Forrester) 和 Darkhorse Analytics。Some other authors who have been recommended are: Lachlan James, William McKnight, and Boris Evelson (Forrester), Darkhorse Analytics.

更多问题?More questions? 尝试参与 Power BI 社区Try the Power BI Community