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

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.

异常图表输出的屏幕截图。