render operator

Learn how to use the render operator to instruct the user agent to render a visualization of the query results.

Instructs the user agent to render a visualization of the query results.

The render operator must be the last operator in the query, and can only be used with queries that produce a single tabular data stream result. The render operator doesn’t modify data. It injects an annotation (“Visualization”) into the result’s extended properties. The annotation contains the information provided by the operator in the query. The interpretation of the visualization information is done by the user agent. Different agents, such as Kusto.Explorer or Azure Data Explorer web UI, may support different visualizations.

The data model of the render operator looks at the tabular data as if it has three kinds of columns:

  • The x axis column (indicated by the xcolumn property).

  • The series columns (any number of columns indicated by the series property.) For each record, the combined values of these columns define a single series, and the chart has as many series as there are distinct combined values.

  • The y axis columns (any number of columns indicated by the ycolumns property). For each record, the series has as many measurements (“points” in the chart) as there are y-axis columns.

    by the query. In particular, having “uninteresting” columns in the schema of the result might translate into them guessing wrong. Try projecting-away such columns when that happens.

Syntax

T | render visualization [with ( propertyName = propertyValue [, …])]

Parameters

NameTypeRequiredDescription
Tstring✔️Input table name.
visualizationstring✔️Indicates the kind of visualization to use. Must be one of the supported values in the following list.
propertyName, propertyValuestringA comma-separated list of key-value property pairs. See supported properties.

Visualization

visualizationDescriptionIllustration
anomalychartSimilar to timechart, but highlights anomalies using series_decompose_anomalies function.:::image type=“icon” source=“media/renderoperator/anomaly-chart.png” border=“false”:::
areachartArea graph.:::image type=“icon” source=“media/renderoperator/area-chart.png” border=“false”:::
barchartdisplayed as horizontal strips.:::image type=“icon” source=“media/renderoperator/bar-chart.png” border=“false”:::
cardFirst result record is treated as set of scalar values and shows as a card.:::image type=“icon” source=“media/renderoperator/card.png” border=“false”:::
columnchartLike barchart with vertical strips instead of horizontal strips.:::image type=“icon” source=“media/renderoperator/column-chart.png” border=“false”:::
ladderchartLast two columns are the x-axis, other columns are y-axis.:::image type=“icon” source=“media/renderoperator/ladder-chart.png” border=“false”:::
linechartLine graph.:::image type=“icon” source=“media/renderoperator/line-chart.png” border=“false”:::
piechartFirst column is color-axis, second column is numeric.:::image type=“icon” source=“media/renderoperator/pie-chart.png” border=“false”:::
pivotchartDisplays a pivot table and chart. User can interactively select data, columns, rows and various chart types.:::image type=“icon” source=“media/renderoperator/pivot-chart.png” border=“false”:::
scatterchartPoints graph.:::image type=“icon” source=“media/renderoperator/scatter-chart.png” border=“false”:::
stackedareachartStacked area graph.:::image type=“icon” source=“media/renderoperator/stacked-area-chart.png” border=“false”:::
tableDefault - results are shown as a table.:::image type=“icon” source=“media/renderoperator/table-visualization.png” border=“false”:::
timechartLine graph. First column is x-axis, and must be datetime. Other (numeric) columns are y-axes.:::image type=“icon” source=“media/renderoperator/visualization-timechart.png” border=“false”:::
timepivotInteractive navigation over the events time-line (pivoting on time axis):::image type=“icon” source=“media/renderoperator/visualization-time-pivot.png” border=“false”:::
treemapDisplays hierarchical data as a set of nested rectangles.:::image type=“icon” source=“media/renderoperator/tree-map.png” border=“false”:::
VisualizationDescriptionIllustration
areachartArea graph. First column is the x-axis and should be a numeric column. Other numeric columns are y-axes.:::image type=“icon” source=“media/renderoperator/area-chart.png” border=“false”:::
barchartFirst column is the x-axis and can be text, datetime or numeric. Other columns are numeric, displayed as horizontal strips.:::image type=“icon” source=“media/renderoperator/bar-chart.png” border=“false”:::
columnchartLike barchart with vertical strips instead of horizontal strips.:::image type=“icon” source=“media/renderoperator/column-chart.png” border=“false”:::
piechartFirst column is color-axis, second column is numeric.:::image type=“icon” source=“media/renderoperator/pie-chart.png” border=“false”:::
scatterchartPoints graph. First column is the x-axis and should be a numeric column. Other numeric columns are y-axes.:::image type=“icon” source=“media/renderoperator/scatter-chart.png” border=“false”:::
tableDefault - results are shown as a table.:::image type=“icon” source=“media/renderoperator/table-visualization.png” border=“false”:::
timechartLine graph. First column is x-axis, and should be datetime. Other (numeric) columns are y-axes. There’s one string column whose values are used to “group” the numeric columns and create different lines in the chart (further string columns are ignored).:::image type=“icon” source=“media/renderoperator/visualization-timechart.png” border=“false”:::
visualizationDescriptionIllustration
anomalychartSimilar to timechart, but highlights anomalies using series_decompose_anomalies function.:::image type=“icon” source=“media/renderoperator/anomaly-chart.png” border=“false”:::
areachartArea graph.:::image type=“icon” source=“media/renderoperator/area-chart.png” border=“false”:::
barchartdisplayed as horizontal strips.:::image type=“icon” source=“media/renderoperator/bar-chart.png” border=“false”:::
cardFirst result record is treated as set of scalar values and shows as a card.:::image type=“icon” source=“media/renderoperator/card.png” border=“false”:::
columnchartLike barchart with vertical strips instead of horizontal strips.:::image type=“icon” source=“media/renderoperator/column-chart.png” border=“false”:::
linechartLine graph.:::image type=“icon” source=“media/renderoperator/line-chart.png” border=“false”:::
piechartFirst column is color-axis, second column is numeric.:::image type=“icon” source=“media/renderoperator/pie-chart.png” border=“false”:::
scatterchartPoints graph.:::image type=“icon” source=“media/renderoperator/scatter-chart.png” border=“false”:::
stackedareachartStacked area graph.:::image type=“icon” source=“media/renderoperator/stacked-area-chart.png” border=“false”:::
tableDefault - results are shown as a table.:::image type=“icon” source=“media/renderoperator/table-visualization.png” border=“false”:::
timechartLine graph. First column is x-axis, and must be datetime. Other (numeric) columns are y-axes.:::image type=“icon” source=“media/renderoperator/visualization-timechart.png” border=“false”:::

Supported properties

PropertyName/PropertyValue indicate additional information to use when rendering. All properties are optional. The supported properties are:

PropertyNamePropertyValue
accumulateWhether the value of each measure gets added to all its predecessors. (true or false)
kindFurther elaboration of the visualization kind. For more information, see kind property.
legendWhether to display a legend or not (visible or hidden).
seriesComma-delimited list of columns whose combined per-record values define the series that record belongs to.
yminThe minimum value to be displayed on Y-axis.
ymaxThe maximum value to be displayed on Y-axis.
titleThe title of the visualization (of type string).
xaxisHow to scale the x-axis (linear or log).
xcolumnWhich column in the result is used for the x-axis.
xtitleThe title of the x-axis (of type string).
yaxisHow to scale the y-axis (linear or log).
ycolumnsComma-delimited list of columns that consist of the values provided per value of the x column.
ysplitHow to split the visualization into multiple y-axis values. For more information, see y-split property.
ytitleThe title of the y-axis (of type string).
anomalycolumnsProperty relevant only for anomalychart. Comma-delimited list of columns, which will be considered as anomaly series and displayed as points on the chart
PropertyNamePropertyValue
kindFurther elaboration of the visualization kind. For more information, see kind property.
seriesComma-delimited list of columns whose combined per-record values define the series that record belongs to.
titleThe title of the visualization (of type string).

kind property

This visualization can be further elaborated by providing the kind property. The supported values of this property are:

VisualizationkindDescription
areachartdefaultEach “area” stands on its own.
unstackedSame as default.
stackedStack “areas” to the right.
stacked100Stack “areas” to the right and stretch each one to the same width as the others.
barchartdefaultEach “bar” stands on its own.
unstackedSame as default.
stackedStack “bars”.
stacked100Stack “bars” and stretch each one to the same width as the others.
columnchartdefaultEach “column” stands on its own.
unstackedSame as default.
stackedStack “columns” one atop the other.
stacked100Stack “columns” and stretch each one to the same height as the others.
scatterchartmapExpected columns are [Longitude, Latitude] or GeoJSON point. Series column is optional. For more information, see Geospatial visualizations.
piechartmapExpected columns are [Longitude, Latitude] or GeoJSON point, color-axis and numeric. Supported in Kusto Explorer desktop. For more information, see Geospatial visualizations.

ysplit property

Some visualizations support splitting into multiple y-axis values:

ysplitDescription
noneA single y-axis is displayed for all series data. (Default)
axesA single chart is displayed with multiple y-axes (one per series).
panelsOne chart is rendered for each ycolumn value. Maximum five panels.

How to render continuous data

Several visualizations are used for rendering sequences of values, for example, linechart, timechart, and areachart. These visualizations have the following conceptual model:

  • One column in the table represents the x-axis of the data. This column can be explicitly defined using the xcolumn property. If not defined, the user agent picks the first column that is appropriate for the visualization.
    • For example: in the timechart visualization, the user agent uses the first datetime column.
    • If this column is of type dynamic and it holds an array, the individual values in the array will be treated as the values of the x-axis.
  • One or more columns in the table represent one or more measures that vary by the x-axis. These columns can be explicitly defined using the ycolumns property. If not defined, the user agent picks all columns that are appropriate for the visualization.
    • For example: in the timechart visualization, the user agent uses all columns with a numeric value that haven’t been specified otherwise.
    • If the x-axis is an array, the values of each y-axis should also be an array of a similar length, with each y-axis occurring in a single column.
  • Zero or more columns in the table represent a unique set of dimensions that group together the measures. These columns can be specified by the series property, or the user agent will pick them automatically from the columns that are otherwise unspecified.

three kinds of columns: property). For each record, the series has as many measurements (“points” in the chart) as there are y-axis columns.

Example

InsightsMetrics
| where Computer == "DC00.NA.contosohotels.com"
| where Namespace  == "Processor" and Name == "UtilizationPercentage"
| summarize avg(Val) by Computer, bin(TimeGenerated, 1h)
| render timechart