barchart Ignoring the ymin and ymax values

Microsoft

I know there is an open post but even that isn't closed. Along with these params many other properties also doesn't seem to work. e.g. legend

My query :

AzureDiagnostics
    | where replicationProviderName_s == "A2A"
    | where isnotempty(name_s) and isnotnull(name_s)
    | extend RPO = case(rpoInSeconds_d <= 900, "<15Min",
    rpoInSeconds_d <= 1800, "15-30Min",
    ">30Min")
    | summarize hint.strategy=partitioned arg_max(TimeGenerated, *) by name_s
    | project name_s , RPO
    | summarize Count = count() by RPO
| render barchart with (ymin=0)
 
 
My output :
table data.PNGoutput.PNG
Expected output:
rpo.PNG
 
I tried changing all the options, but it still looks like above. 
Also how can i fix the x axis to show 3 fix values i.e. <15, 15-20, >30 always
 
4 Replies

@hsaini007 

 

Would this help?

AzureDiagnostics
    | where replicationProviderName_s == "A2A"
    | where isnotempty(name_s) and isnotnull(name_s)
    | extend RPO = case(
            rpoInSeconds_d <= 100,  "<15Min",
            rpoInSeconds_d <= 1000, "15-30Min",
                                    ">30Min")
    | summarize hint.strategy=partitioned arg_max(TimeGenerated, *) by name_s
    | project comp_list = name_s , RPO
    | summarize count(comp_list) by RPO, comp_list
| render barchart kind=stacked 

@CliveWatson : thanks for your reply but the output is still not as expected.

Elaborating the context here, I am trying to group the occurences based on time range showing the count of occurrences per range.

E.g. How many vm's have RPO time <15 min, how many between 15-30min and rest.  

The output of the updated query looks below. unstacking just result in a bar of height 1.new output.PNG

@hsaini007 

 

If its just a count, wouldn't this be enough?

AzureDiagnostics
    | where replicationProviderName_s == "A2A"
    | where isnotempty(name_s) and isnotnull(name_s)
    | extend RPO = case(
            rpoInSeconds_d <= 100,  "<15Min",
            rpoInSeconds_d <= 500, "15-30Min",
                                    ">30Min")
| summarize count() by RPO , name_s
| render barchart

Annotation 2019-07-08 104957.jpg

 

or (hide the name_s)

Annotation 2019-07-08 105030-2.jpg

 

 

Go to Log Analytics and Run Query

 

 

Hey @CliveWatson : The problem remains the same. due to yMin not being set to 0 I can never see the bar for the third range. new data.PNGnew gaph.PNG