Search code examples
azure-application-insights

Azure Application Insights - Render ColumnChart as Unstacked


I am putting together a dashboard for our production services and I am trying to create a unified chart of response performance across multiple services.

Now, I can get the the query to run but it created a STACKED column chart but I cannot seem to get it to UNSTACK unless I manually go to the chart properties and change it, but this is not a persistent change as it will reset when you reload / refresh the page.

Here's my query

// 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

And here's the output

enter image description here

But this is what I want (by default)

enter image description here


Solution

  • I can get the the query to run but it created a STACKED column chart but I cannot seem to get it to UNSTACK unless I manually go to the chart properties and change it, but this is not a persistent change as it will reset when you reload / refresh the page.

    If you want to show the Unstacked Chart Type use the Kind property has Unstacked.

    Workaround follows:

    The query I have used in my Application Insights

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

    Result

    enter image description here

    After Adding in Dashboard

    enter image description here