Render

render

Specifies a visualization type for the query results. When present, the frontend renders the results using the specified chart type instead of the default table grid.

Spec

... | render <chart_type> [with (<property> = <value> [, ...])]

Parameters

chart_type - The visualization type (see Chart Types below).
property   - Optional rendering properties.

Return Value

The same data as the input, annotated with visualization metadata.

Render Options

All chart types accept optional with (...) properties to control visualization behavior. Options are passed as key-value pairs.

Universal Options

These options apply to all chart types.

OptionTypeDefaultDescription
titlestringnoneChart title displayed above the visualization
legendboolheuristicShow or hide the legend. Default heuristic: show when 1-9 series, hide otherwise
legendPositionstring"bottom"Legend placement: "top", "bottom", "left", "right"
metrics
| summarize avg(cpu) by bin(timestamp, 1m), host
| render timechart with (title = "CPU by Host", legend = true, legendPosition = "top")

Axis Unit Options

These options apply to timechart, linechart, and barchart. They control how numeric values are formatted on axis tick labels.

OptionTypeDefaultDescription
xUnitstringnoneUnit format for x-axis tick labels
yUnitstringnoneUnit format for y-axis tick labels

Supported Units

Unit IDCategoryFormatting
"bytes"Data sizeBinary auto-scale: B, KB, MB, GB, TB (÷1024)
"decbytes"Data sizeDecimal auto-scale: B, KB, MB, GB, TB (÷1000)
"bytesps"Data rateBinary auto-scale + /s suffix
"bits"BitsDecimal auto-scale: b, Kb, Mb, Gb
"celsius"TemperatureAppend °C
"fahrenheit"TemperatureAppend °F
"kelvin"TemperatureAppend K
"seconds"DurationAuto-scale to human-readable duration
"milliseconds"DurationAuto-scale to human-readable duration
"microseconds"DurationAuto-scale to human-readable duration
"percent"PercentValues 0–100 shown with %
"percentunit"PercentValues 0–1 multiplied by 100, shown with %
"none"NumberSI suffixes for large numbers (K, M, G, T)

When a column has a timespan type, axis ticks are automatically formatted as durations. An explicit yUnit or xUnit always takes precedence over this auto-detection.

logship.backend.executor.local.schemas.size_bytes
| summarize max = agg_max(max) by bin(timestamp, 1m), account
| render timechart with (title = "Disk Usage", yUnit = "bytes")
metrics
| summarize avg(cpu_fraction) by bin(timestamp, 1m)
| render timechart with (yUnit = "percentunit")
sensors
| summarize avg(temp) by bin(timestamp, 1m), location
| render linechart with (yUnit = "celsius")

Line / Time Chart Options

These options apply to timechart and linechart.

OptionTypeDefaultDescription
fillbooltrueFill the area under lines
tensionnumber0.05Line curve smoothness (0 = sharp angles, 1 = very smooth)
pointSizenumber0Point radius in pixels (0 = hidden)
lineWidthnumber1Line border width in pixels
yScalestring"linear"Y-axis scale type: "linear" or "log"
stackedboolfalseStack series on top of each other
gridbooltrueShow background grid lines
spanGapsbool/number/stringtrueConnect points across gaps. true = always connect, false = never connect through missing data, number = max gap in ms to span, "auto" = auto-detect interval and break at 3x the median gap
metrics
| summarize avg(cpu) by bin(timestamp, 1m), host
| render timechart with (fill = false, tension = 0.4, lineWidth = 2, pointSize = 3)
// Auto-detect interval and break lines at large gaps
metrics
| summarize avg(cpu) by bin(timestamp, 1m), host
| render timechart with (spanGaps = "auto")
// Break lines when data gaps exceed 5 minutes
metrics
| summarize avg(cpu) by bin(timestamp, 1m), host
| render timechart with (spanGaps = 300000)
metrics
| summarize sum(bytes) by bin(timestamp, 1m), service
| render timechart with (stacked = true, yScale = "log", grid = false)

Bar Chart Options

These options apply to barchart.

OptionTypeDefaultDescription
stackedboolfalseStack bars for grouped data
horizontalboolfalseRender bars horizontally
gridbooltrueShow background grid lines
requests
| summarize count() by region
| render barchart with (horizontal = true)

Pie Chart Options

These options apply to piechart.

OptionTypeDefaultDescription
kindstring"pie"Chart variant: "pie" or "doughnut"
requests
| summarize count() by method
| render piechart with (kind = "doughnut")

Gantt Chart Options

These options apply to gantt.

OptionTypeDefaultDescription
rowHeightnumber36Row height in pixels
tasks
| project name, start, end, group
| render gantt with (rowHeight = 48)

Chart Types

timechart

Time series visualization with a datetime column on the x-axis and numeric metrics on the y-axis.

metrics
| where timestamp > ago(1h)
| summarize avg(cpu) by bin(timestamp, 1m)
| render timechart

linechart

Line chart with a numeric x-axis and one or more numeric series.

range x from 0 to 100 step 1
| extend y = sin(x * pi() / 50)
| render linechart

barchart

Bar chart for comparing values across categories.

requests
| where timestamp > ago(1d)
| summarize count() by statusCode
| render barchart

piechart

Pie chart showing proportional distribution.

requests
| where timestamp > ago(1h)
| summarize count() by method
| render piechart

map2d

2D geographic map visualization. Requires latitude and longitude columns of type float64.

locations
| project latitude, longitude, name
| render map2d

gantt

Gantt chart for scheduling and timeline visualization. Requires name, start, and end columns. Optionally supports color and group columns.

tasks
| project name, start, end, group
| render gantt

trace

Distributed trace visualization for viewing spans in a trace tree. Requires timestamp (datetime), traceid, parentid, and spanid columns.

spans
| where traceid == "abc123"
| project timestamp, traceid, parentid, spanid, operationName, duration
| render trace

stat

Statistical card display showing key metrics. Requires at least one numeric field.

metrics
| where timestamp > ago(5m)
| summarize avg(cpu), avg(memory), count()
| render stat

table

Default table grid display. This is the default when no render operator is specified.

logs
| take 100
| render table