如何使仪表板小部件呈现为条形图而不是表格-Azure仪表板

时间:2019-04-29 18:27:08

标签: azure azure-application-insights dashboard azure-log-analytics

我有一个自定义日志查询,该查询工作正常,并且可以按照我指定的条形图在App-Insights中正确呈现。

enter image description here 但是,当试图将其显示在仪表板上时,它仅显示图表数据,我无法弄清楚如何将其呈现为条形图。 enter image description here 我想念什么?

1 个答案:

答案 0 :(得分:1)

对您共享的内容运行类似的查询。

customMetrics
| where name == "HeartbeatState" or name == "HttpTrigger1 Count"
| summarize hits = count() by name, timestamp
| make-series hits = sum(hits) default=0 on timestamp in range(ago(7d), now(), 1d) by name
| mvexpand timestamp , hits
| project format_datetime(todatetime(timestamp), "MM-dd"),todouble(hits), name  
| render barchart kind=unstacked 

enter image description here

可能的原因可能是Azure仪表板时间范围超过了固定图块的时间范围。在这种情况下,您能否确保整个仪表板时间范围等于或等于“过去7天”。这样它就不会覆盖单个图表/查询。我们确实在Azure仪表板上看到了相同的图表。

enter image description here

希望这会有所帮助。

相关问题