Applies to: ✅Microsoft Fabric✅Azure Data Explorer✅Azure Monitor✅Microsoft 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 |
每個量值的值是否會新增至其所有前置專案。 (true 或 false) |
kind |
進一步闡述視覺效果種類。 如需詳細資訊,請參閱 kind 屬性。 |
legend |
是否要顯示圖例(visible 或 hidden)。 |
series |
以逗號分隔的數據行清單,其合併每個記錄值會定義記錄所屬的數位。 |
title |
視覺效果的標題(類型 string為 )。 |
xaxis |
如何縮放 X 軸 (linear 或 log)。 |
xcolumn |
結果中的哪一個數據行用於 x 軸。 |
xtitle |
x 軸的標題(類型為 string)。 |
yaxis |
如何縮放 Y 軸 (linear 或 log)。 |
ycolumns |
以逗號分隔的數據列清單,其中包含 x 資料行每個值所提供的值。 |
ytitle |
y 軸的標題(類型 string為 )。 |
| PropertyName | PropertyValue |
|---|---|
kind |
進一步闡述視覺效果種類。 如需詳細資訊,請參閱 kind 屬性。 |
series |
以逗號分隔的數據行清單,其合併每個記錄值會定義記錄所屬的數位。 |
title |
視覺效果的標題(類型 string為 )。 |
kind 屬性
藉由提供 kind 屬性,即可進一步詳細說明此視覺效果。
此屬性的支援值為:
kind 值 |
Description |
|---|---|
map |
預期的數據行為 [經度、緯度] 或 GeoJSON 點、色彩軸和數值。 Kusto Explorer 桌面支援。 For more information, see Geospatial visualizations |
Example
The examples in this article use publicly available tables in the help cluster, such as the
StormEventstable in the Samples database.
The examples in this article use publicly available tables, such as the
Weathertable in the Weather analytics sample gallery. 您可能需要修改範例查詢中的資料表名稱,以符合工作區中的資料表。
此查詢提供前 10 個狀態的視覺表示法,其中包含最高數目的 Storm 事件,顯示為餅圖
StormEvents
| summarize statecount=count() by State
| sort by statecount
| limit 10
| render piechart with(title="Storm Events by State")