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!