共用方式為


Anomaly chart

Applies to: ✅Microsoft FabricAzure Data Explorer

The anomaly chart visualization is similar to a timechart, but highlights anomalies using the series_decompose_anomalies function.

Note

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

Syntax

T|renderanomalychart [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
legend 是否要顯示圖例(visiblehidden)。
series 以逗號分隔的數據行清單,其合併每個記錄值會定義記錄所屬的數位。
ymin 要顯示在 Y 軸上的最小值。
ymax 要顯示在 Y 軸上的最大值。
title 視覺效果的標題(類型 string為 )。
xaxis 如何縮放 X 軸 (linearlog)。
xcolumn 結果中的哪一個數據行用於 x 軸。
xtitle x 軸的標題(類型為 string)。
yaxis 如何縮放 Y 軸 (linearlog)。
ycolumns 以逗號分隔的數據列清單,其中包含 x 資料行每個值所提供的值。
ysplit 如何將視覺效果分割成多個 Y 軸值。 For more information, see Multiple y-axes.
ytitle y 軸的標題(類型 string為 )。
anomalycolumns 以逗號分隔的數據行清單,這會被視為異常數列,並顯示為圖表上的點

ysplit 屬性

此視覺效果支援分割成多個 Y 軸值。 此屬性的支援值為:

ysplit Description
none 所有數列數據都會顯示單一 Y 軸。 (Default)
axes 單一圖表會以多個 Y 軸顯示(每個數列一個)。
panels 每個 ycolumn 值都會轉譯一張圖表。 最多五個面板。

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. 您可能需要修改範例查詢中的資料表名稱,以符合工作區中的資料表。

let min_t = datetime(2017-01-05);
let max_t = datetime(2017-02-03 22:00);
let dt = 2h;
demo_make_series2
| make-series num=avg(num) on TimeStamp from min_t to max_t step dt by sid 
| where sid == 'TS1'   //  select a single time series for a cleaner visualization
| extend (anomalies, score, baseline) = series_decompose_anomalies(num, 1.5, -1, 'linefit')
| render anomalychart with(anomalycolumns=anomalies, title='Web app. traffic of a month, anomalies') //use "| render anomalychart with anomalycolumns=anomalies" to render the anomalies as bold points on the series charts.

異常圖表輸出的螢幕快照。