磁贴可视化Tile visualizations
磁贴适用于在工作簿中呈现摘要数据。Tiles are a useful way to present summary data in workbooks. 下图显示了磁贴的常见用例,应用级别摘要位于详细网格的顶部。The image below shows a common use case of tiles with app level summary on top of a detailed grid.
工作簿磁贴支持显示标题、副标题、大文本、图标、基于指标的渐变、缩微折线图/条形图、页脚等。Workbook tiles support showing a title, subtitle, large text, icons, metric based gradients, spark line/bars, footer, etc.
添加磁贴Adding a tile
单击“编辑”工具栏项,将工作簿切换到编辑模式。Switch the workbook to edit mode by clicking on the Edit toolbar item.
依次选择“添加”、“添加查询”,将日志查询控件添加到工作簿。Select Add then Add query to add a log query control to the workbook.
选择“日志”作为查询类型,并选择资源类型(例如 Application Insights)以及目标资源。Select the query type as Log, resource type (for example, Application Insights) and the resources to target.
使用查询编辑器输入用于分析的 KQL。Use the Query editor to enter the KQL for your analysis.
requests | summarize Requests = count() by appName, name | top 7 by Requests desc
将“大小”设置为“完整”。Set Size to Full.
将可视化效果设置为“磁贴”。Set the visualization to Tiles.
选择“磁贴设置”按钮以打开“设置”窗格。Select the Tile Settings button to open the settings pane.
- 在“标题”中,设置:In Title, set:
- 使用列:
name
。Use column:name
.
- 使用列:
- 在“左侧”中,设置:In Left, set:
- 使用列:
Requests
。Use column:Requests
. - 列呈现器:
Big Number
。Column renderer:Big Number
. - 调色板:
Green to Red
Color palette:Green to Red
- 最小值:
0
。Minimum value:0
.
- 使用列:
- 在“底部”中,设置:In Bottom, set:
- 使用列:
appName
。Use column:appName
.
- 使用列:
- 在“标题”中,设置:In Title, set:
选择窗格底部的“保存并关闭”按钮。Select the Save and Close button at the bottom of the pane.
读取模式下的磁贴:The tiles in read mode:
磁贴中的 Spark 行Spark lines in tiles
单击“编辑”工具栏项,将工作簿切换到编辑模式。Switch the workbook to edit mode by clicking on the Edit toolbar item.
添加一个名为
TimeRange
的时间范围参数。Add a time range parameter calledTimeRange
.- 依次选择“添加”、“添加参数”。Select Add and then Add parameters.
- 在参数控件中,选择“添加参数”。In the parameter control, select Add Parameter.
- 在“参数名称”字段中输入
TimeRange
,然后选择Time range picker
作为“参数类型”。EnterTimeRange
in the Parameter name field and chooseTime range picker
for Parameter type. - 选择窗格顶部的“保存”,然后在参数控件中选择“完成编辑”。Select Save at the top of the pane and then select Done Editing in the parameter control.
依次选择“添加”、“添加查询”,以便在参数控件下方添加日志查询控件。Select Add then Add query to add a log query control below the parameter control.
选择“日志”作为查询类型,并选择资源类型(例如 Application Insights)以及目标资源。Select the query type as Log, resource type (for example, Application Insights) and the resources to target.
使用查询编辑器输入用于分析的 KQL。Use the Query editor to enter the KQL for your analysis.
let topRequests = requests | summarize Requests = count() by appName, name | top 7 by Requests desc; let topRequestNames = topRequests | project name; requests | where name in (topRequestNames) | make-series Trend = count() default = 0 on timestamp from {TimeRange:start} to {TimeRange:end} step {TimeRange:grain} by name | join (topRequests) on name | project-away name1, timestamp
选择“运行查询”。Select Run Query. (请确保在运行查询之前将
TimeRange
设置为所选的值。)(Make sure to setTimeRange
to a value of your choosing before running the query.)将可视化效果设置为“磁贴”。Set the Visualization to "Tiles".
将“大小”设置为“完整”。Set the Size to "Full".
选择“磁贴设置”。Select Tile Settings.
- 在“磁贴”中,设置:In Tile, set:
- 使用列:
name
。Use column:name
.
- 使用列:
- 在“子磁贴”中,设置:In Subtile, set:
- 使用列:
appNAme
。Use column:appNAme
.
- 使用列:
- 在“左侧”中,设置:In Left, set:
- 使用列:
Requests
。Use column:Requests
. - 列呈现器:
Big Number
。Column renderer:Big Number
. - 调色板:
Green to Red
。Color palette:Green to Red
. - 最小值:
0
。Minimum value:0
.
- 使用列:
- 在“底部”中,设置:In Bottom, set:
- 使用列:
Trend
。Use column:Trend
. - 列呈现器:
Spark line
。Column renderer:Spark line
. - 调色板:
Green to Red
。Color palette:Green to Red
. - 最小值:
0
。Minimum value:0
.
- 使用列:
- 在“磁贴”中,设置:In Tile, set:
选择窗格底部的“保存并关闭”。Select Save and Close at the bottom of the pane.
磁贴大小Tile sizes
创建者可以选择在磁贴设置中设置磁贴宽度。The author has an option to set the tile width in the tile settings.
fixed
(默认值)fixed
(default)磁贴的默认行为是相同的固定宽度(大约为 160 像素宽)加上磁贴周围的空间。The default behavior of tiles is to be the same fixed width, approx. 160 pixels wide, plus the space around the tiles.
auto
每个标题都会根据其内容缩小或增大,但磁贴被限制为磁贴视图(无水平滚动)的宽度。Each title will shrink or grow to fit their contents however, the tiles are limited to the width of the tiles' view (no horizontal scrolling).
full size
每个标题将始终为磁贴视图的整个宽度,每行一个标题。Each title will always be the full width of the tiles' view, one title per line.
后续步骤Next steps
- 磁贴还支持复合条呈现器。Tiles also support Composite bar renderer. 若要了解详细信息,请访问复合条文档。To learn more visit Composite Bar documentation.
- 若要详细了解
TimeRange
等时间参数,请访问工作簿时间参数文档。To learn more about time parameters likeTimeRange
visit workbook time parameters documentation.