【问题标题】:How do I make my dashboard widget render as a barchart and not a table - Azure Dashboard如何使我的仪表板小部件呈现为条形图而不是表格 - Azure 仪表板
【发布时间】:2019-09-18 09:45:25
【问题描述】:

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

但是,当尝试在仪表板上显示它时,它只显示图表数据,我不知道如何让它呈现为条形图。 我错过了什么?

【问题讨论】:

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


    【解决方案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 
    

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

    希望这会有所帮助。

    【讨论】:

      猜你喜欢
      • 2016-07-15
      • 2014-04-02
      • 1970-01-01
      • 2013-11-05
      • 1970-01-01
      • 1970-01-01
      • 2018-03-23
      • 2020-07-22
      • 2011-02-18
      相关资源
      最近更新 更多