• azurecoder

Kusto Lightning Fact 2: render

One of the great things about Kusto and KQL is that the key language bindings support charts as well as tabular output. Aside from this being very cool it means that you can do everything within the Kusto environment.

Let's remind ourselves of the query from the last Kusto lightning fact.

project Region, Total_Revenue, Order_Date
| summarize Earnings = round(sum(Total_Revenue) / 1000000000, 1) by Region, Year = getyear(Order_Date)
| order by Region, Year asc;

In order to build a bar chart we simply need to render the above query.

| render columnchart with(ycolumns=Earnings, xcolumn=Year, series=Region);

So we pipe the original query to our render function setting the Y column as Earnings, the X column as Year and building a series for the various Regions we're reporting on.

As you can see the below we get nice coloured columns appear the series in our environment as well as tooltips and a legend on the right. Aside from 2017, which may be incomplete, the data doesn't vary that much.

Have fun rendering charts!

380 views0 comments

Recent Posts

See All

I had a great time last weekend with a garden party with my friend and one of my longstanding tech leads David. It was great to spend the afternoon with friends and work colleagues. Great food, great

I've taken the last week off. For the first time in about a decade I haven't responded to emails (at least I've picked and chosen), Teams messages (same) and I've signed out of all of my customer acco

I was mulling over whether to derive a new jocular term for a Data Mesh. I pondered Data Mess but that seemed to obvious so I've opted for Data Smoosh which isn't as poetic but kind of reminds me of S