Skip to Content
Tableau Desktop 烹饪书
book

Tableau Desktop 烹饪书

by Lorna Brown
May 2025
Intermediate to advanced
688 pages
12h 45m
Chinese
O'Reilly Media, Inc.
Content preview from Tableau Desktop 烹饪书

第 3 章 条形图 条形图

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

条形图是最常用的图表类型之一。它允许人眼比较长度或高度之间的差异,而这正是前注意属性之一。条形图由分类数据分割而成,并显示连续的测量值。基本条形图有两种类型:水平条形图和垂直条形图。条形图还有其他变化,包括堆叠条形图、发散条形图和直方图。

3.1 水平柱形图

问题

您需要创建一个水平条形图,从高到低显示按分类维度 "子类别"细分的连续度量 "销售额总和"。

解决方案

您有三种解决方案可供选择。下面是方案 1:

  1. 创建新工作表。

  2. 使用超级市场销售数据,双击子类别:

  3. 将 "销售量 "拖到 "列 "架上:

  4. 将鼠标悬停在轴上,可显示排序条图标。单击排序图标创建降序条形图:

下面是方案 2:

  1. 创建新工作表。

  2. 双击销售 (1)。

  3. 双击子类别 (2)。这将创建一个垂直条形图:

  4. 要将其转换为水平条形图,请单击工具栏上的 "行列互换 "按钮 (1)。

    单击工具栏上的 "降序排序 "按钮 (2),即可将垂直条形图转换为水平条形图:

这里是方案 3:

  1. 点击销售。

  2. 按住 Ctrl 键(Mac 上为 Command 键)并选择子类别。

  3. 在视图右上方,单击 "显示我 "选项卡。

  4. 单击 Tableau 高亮显示的最适合步骤 1 和 3 中所选维度的图表。最合适的图表有边框。

    备注

    Tableau 突出显示的最适合数据的图表类型不一定是最佳选择,也不一定是您要创建的图表。

  5. 对数据进行排序的另一种方法是右键单击行中的子类别字段,然后单击排序:

  6. 改为按字段排序:

  7. 更改为降序,并确认排序方式为销售额,汇总方式为总和:

讨论

在所提供的解决方案中,水平条形图比垂直条形图更适合数据。如果回顾一下选项 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Tableau Prep即学即用

Tableau Prep即学即用

Carl Allchin
The Human Factor in AI-Based Decision-Making

The Human Factor in AI-Based Decision-Making

Philip Meissner, Christoph Keding
Coaching for High Performance

Coaching for High Performance

MIT Sloan Management Review

Publisher Resources

ISBN: 9798341659216