Forum Discussion
joergha
Jun 22, 2019Copper Contributor
Barchart ignoring one data series
The following query
Heartbeat
| where TimeGenerated >= startofday(ago(2d))
| where Computer == "ADMIN-PC" or Computer == "SERVER-PC"
| summarize dcount(Computer) by t = endofday(TimeGenerated) , Computer
| sort by t, Computer
| render barchart kind=default
produces the following table of 6 record in two sets:
I'd expect to see a barchart with two series, but the result only shows one:
The behavour is consistent. When I chose three series only two will be displayed. Do I miss anything?
Regards Jörg
- CliveWatson
Microsoft
Wouldn't you show it as 'unstacked'? e.g change the last line to:
| render barchart kind=unstacked- joerghaCopper Contributor
thx for the reply! When changing on unstacked everything looks fine.
I dived a little more into the previous stacked barchart diagramm. There the Y-scale starts at 1. That might be the reason one series doesn't seem to show up. In my opinion for a stacked barchart diagram the Y-scale always must start at 0.
Regards Joergs
- CliveWatson
Microsoft
You can use https://docs.microsoft.com/en-us/azure/kusto/query/make-seriesoperator to backfill the required 0s (zeros). Have a look, when I have some time later I'll see if I have an example