Azure Application Insights - 将柱形图渲染为未堆叠

问题描述 投票:0回答:2

我正在为我们的生产服务整合一个仪表板,并尝试创建跨多个服务的统一响应性能图表。

现在,我可以运行查询,但它创建了一个 STACKED 柱形图,但我似乎无法将其取消堆叠,除非我手动转到图表属性并更改它,但这不是持久性更改,因为它会重置当您重新加载/刷新页面时。

这是我的询问

// Create a combined dataset
let mainTable = union pageViews, customEvents, requests
    | where isempty(operation_SyntheticSource)
    | extend name =replace("\n", "", name)
    | extend name =replace("\r", "", name);
// Generate chart data
mainTable
| where duration > 1000 // Not interested in any responses under 1 second
| parse (duration / 1000) // Take the whole number of seconds
with P1: int
    "."
    notInterested: string
| extend peformanceBucket = iff(P1 > 4, ">4", tostring(P1))
| project name, duration, peformanceBucket
| summarize Count = count() by peformanceBucket, name
| order by peformanceBucket
| render columnchart

这是输出

但这就是我想要的(默认)

azure-application-insights
2个回答
2
投票

我可以运行查询,但它创建了一个 STACKED 柱形图,但我似乎无法将其取消堆叠,除非我手动转到图表属性并更改它,但这不是持久性更改,因为当您重新加载/刷新页面。

如果您想显示 Unstacked 图表类型,请使用 Kind 属性具有 Unstacked

解决方法如下:

我在 Application Insights 中使用的查询

exceptions 
| summarize count = sum(itemCount) by bin(timestamp, 3h), problemId
| order by timestamp asc, problemId
| render columnchart kind=unstacked 

结果

enter image description here

添加到仪表板后

enter image description here


0
投票

如果添加 with(title "stats") ,它将再次破坏 unstack!任何解决方案/建议,请

例外情况 |总结计数 = sum(itemCount) by bin(timestamp, 3h), ProblemId |按时间戳 asc、问题 ID 排序 |渲染柱形图 kind=unstacked with(title "stats")

© www.soinside.com 2019 - 2024. All rights reserved.