How to set ymin and ymax in a timechart render?

1.2k Views Asked by At

How can I set ymin and ymax in a timechart render?

let resourceGroupName = "my-resource-group-name";
let hosts = Heartbeat | where ResourceGroup == resourceGroupName | summarize by Computer;
Perf
| where ObjectName == "Processor" and CounterName == "% Processor Time" and Computer in (hosts)
| summarize CPU = avg(CounterValue) by bin(TimeGenerated, 5m), Computer
| render timechart with (ymin=0, ymax=100)

I read the docs here and I tried to set it like this, but didn't work:

| render timechart with (ymin=0, ymax=100)

enter image description here

1

There are 1 best solutions below

2
On

The docs you're referring to relate to a different client/service than the one you're using. Azure Data Explorer ("Kusto") is the one the docs are referring to, and as they call out:

The render operator has no impact on the results returned for the query, other than to inject a annotation (called "Visualization") that contains the rendering information provided in the query. User agents might not render results as instructed, depending on their support for the required rendering instructions.

As an example, at least two clients (which can only be used for querying Azure Data Explorer clusters at the moment) - Kusto.Explorer and the Azure Data Explorer web UX - do take the rendering information into account when rendering charts.