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

Pie chart

Applies to: ✅Microsoft FabricAzure Data ExplorerAzure MonitorMicrosoft Sentinel

饼图视觉对象至少需要查询结果中的两列。 默认情况下,第一列用作颜色轴。 此列可以包含文本、日期时间或数值数据类型。 其他列用于确定每个切片的大小,包含数值数据类型。 饼图用于呈现类别的组成及其占总数的比例。

The pie chart visual can also be used in the context of Geospatial visualizations.

Note

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

Syntax

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

Learn more about syntax conventions.

Parameters

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

Supported properties

所有属性都是可选的。

PropertyName PropertyValue
accumulate 是否将每个度量的值加到其所有前导度量中。 (truefalse
kind 可视化效果种类的进一步细化。 有关详细信息,请参阅 kind property
legend 是否显示图例(visiblehidden)。
series 以逗号分隔的列列表,其中的每记录值组合定义了记录所属的系列。
title 可视化效果的标题(string 类型)。
xaxis 如何缩放 x 轴(linearlog)。
xcolumn 结果中的哪一列用于 x 轴。
xtitle x 轴的标题(string 类型)。
yaxis 如何缩放 y 轴(linearlog)。
ycolumns 由逗号分隔的列列表,其中包含根据 x 列的值提供的值。
ytitle y 轴的标题(string 类型)。
PropertyName PropertyValue
kind 可视化效果种类的进一步细化。 有关详细信息,请参阅 kind property
series 以逗号分隔的列列表,其中的每记录值组合定义了记录所属的系列。
title 可视化效果的标题(string 类型)。

kind 属性

可以通过提供 kind 属性来进一步详细阐述此可视化效果。 此属性支持的值为:

kind Description
map 预期的柱形为 [经度,纬度] 或 GeoJSON 点、颜色轴和数值。 在 Kusto 资源管理器桌面中受支持。 For more information, see Geospatial visualizations

Example

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. 可能需要修改示例查询中的表名称以匹配工作区中的表。

此查询提供前 10 个状态的可视表示形式,其中风暴事件数最多,显示为饼图

StormEvents
| summarize statecount=count() by State
| sort by statecount 
| limit 10
| render piechart with(title="Storm Events by State")

饼图可视化效果输出的屏幕截图。