你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

堆积面积图

Applies to: ✅Microsoft FabricAzure Data Explorer

堆积面积图视觉对象显示连续关系。 This visual is similar to the Area chart, but shows the area under each element of a series. 查询的第一列应是数值,并且用作 x 轴。 其他数值列是 y 轴。 与折线图不同,面积图还可以直观地显示体积。 面积图非常适用于指示不同数据集之间的变化。

Note

This visualization can only be used in the context of the render operator.

Syntax

T|renderstackedareachart [with(propertyName=propertyValue [, ...])]

Learn more about syntax conventions.

Supported parameters

Name 类型 Required Description
T string ✔️ 输入表名称。
propertyName, propertyValue string 键值属性对的逗号分隔列表。 See supported properties.

Supported properties

所有属性都是可选的。

PropertyName PropertyValue
accumulate 是否将每个度量的值加到其所有前导度量中。 (truefalse
legend 是否显示图例(visiblehidden)。
series 以逗号分隔的列列表,其中的每记录值组合定义了记录所属的系列。
ymin 要在 Y 轴上显示的最小值。
ymax 要在 Y 轴上显示的最大值。
title 可视化效果的标题(string 类型)。
xaxis 如何缩放 x 轴(linearlog)。
xcolumn 结果中的哪一列用于 x 轴。
xtitle x 轴的标题(string 类型)。
yaxis 如何缩放 y 轴(linearlog)。
ycolumns 由逗号分隔的列列表,其中包含根据 x 列的值提供的值。
ytitle y 轴的标题(string 类型)。

Example

以下查询按乘客数汇总了 nyc_taxi 表中的数据,并可视化堆积面积图中的数据。 x 轴以两天间隔显示取件时间,堆积区域表示不同的乘客计数。

The examples in this article use publicly available tables in the help cluster, such as the StormEvents table in the Samples database.

The examples in this article use publicly available tables, such as the Weather table in the Weather analytics sample gallery. 可能需要修改示例查询中的表名称以匹配工作区中的表。

nyc_taxi
| summarize count() by passenger_count, bin(pickup_datetime, 2d)
| render stackedareachart with (xcolumn=pickup_datetime, series=passenger_count)

Output

堆积面积图视觉对象输出的屏幕截图。