Tableau 简明教程

Tableau - Histogram

直方图表示已分段到范围中的变量值的频率。直方图类似于条形图,但它将值分组到连续范围内。直方图中的每个条形表示该范围内存在的值的数量的高度。

A histogram represents the frequencies of values of a variable bucketed into ranges. Histogram is similar to bar chart but it groups the values into continuous ranges. Each bar in histogram represents the height of the number of values present in that range.

Tableau 通过采用一个度量来创建直方图。它为用于创建直方图中的度量创建了一个附加分段字段。

Tableau creates a histogram by taking one measure. It creates an additional bin field for the measure used in creating a histogram.

Creating a Histogram

使用 Sample-superstore,计划查找不同区域的销售量。为达到此目的,将名称为“数量”的度量拖放到行架。接着打开“展示方式”,然后选择直方图图表。下图显示了创建的图表。它按从 0 到 4811 的值对数量分段并将其分成 12 个分段,并显示了这些数量。

Using the Sample-superstore, plan to find the quantities of sales for different regions. To achieve this, drag the Measure named Quantity to the Rows shelf. Then open Show Me and select the Histogram chart. The following diagram shows the chart created. It shows the quantities automatically bucketed into values ranging from 0 to 4811 and divided into 12 bins.

histogram 1

Creating a Histogram with Dimension

还可以将维度添加到度量中创建直方图。这将创建堆叠的直方图。每根条形都将具有代表维度的值的分段。按照上面示例的步骤,将区域维度添加到标记卡下的颜色架中。这会创建下面的直方图,其中每根条形还包括不同区域的可视化。

You can also add Dimensions to Measures to create histograms. This will create a stacked histogram. Each bar will have stacks representing the values of the dimension. Following the steps of the above example, add the Region Dimension to the color Shelf under Marks Card. This creates the following histogram where each bar also includes the visualization for different regions.

histogram 2