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.
| Option | Type | Default | Description |
|---|---|---|---|
title | string | none | Chart title displayed above the visualization |
legend | bool | heuristic | Show or hide the legend. Default heuristic: show when 1-9 series, hide otherwise |
legendPosition | string | "bottom" | Legend placement: "top", "bottom", "left", "right" |
theme | string | app theme | Force "light" or "dark" colours for this chart, overriding the app theme |
metrics
| summarize avg(cpu) by bin(timestamp, 1m), host
| render timechart with (title = "CPU by Host", legend = true, legendPosition = "top")legendPosition places the legend above ("top"), below ("bottom", default) or beside ("left", "right") the chart area. Legends wrap onto multiple lines above or below the chart and stack vertically beside it; long legends scroll.
metrics
| summarize avg(cpu) by bin(timestamp, 1m), host
| render timechart with (theme = "dark")Axis Unit Options
These options apply to timechart, linechart, and barchart. They control how numeric values are formatted on axis tick labels.
| Option | Type | Default | Description |
|---|---|---|---|
xUnit | string | none | Unit format for x-axis tick labels |
yUnit | string | none | Unit format for y-axis tick labels |
Supported Units
| Unit ID | Category | Formatting |
|---|---|---|
"bytes" | Data size | Binary auto-scale: B, KB, MB, GB, TB (÷1024) |
"decbytes" | Data size | Decimal auto-scale: B, KB, MB, GB, TB (÷1000) |
"bytesps" | Data rate | Binary auto-scale + /s suffix |
"bits" | Bits | Decimal auto-scale: b, Kb, Mb, Gb |
"celsius" | Temperature | Append °C |
"fahrenheit" | Temperature | Append °F |
"kelvin" | Temperature | Append K |
"seconds" | Duration | Auto-scale to human-readable duration |
"milliseconds" | Duration | Auto-scale to human-readable duration |
"microseconds" | Duration | Auto-scale to human-readable duration |
"percent" | Percent | Values 0–100 shown with % |
"percentunit" | Percent | Values 0–1 multiplied by 100, shown with % |
"none" | Number | SI 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.
On a timechart the x-axis tick format adapts to the visible range: under two seconds shows milliseconds, under two minutes shows seconds, within a day hh:mm, up to a week MMM d, hh:mm, longer ranges MMM d, and ranges spanning years include the year. An explicit xUnit overrides this.
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.
| Option | Type | Default | Description |
|---|---|---|---|
fill | bool | true | Fill the area under lines |
tension | number | 0.05 | Line curve smoothness (0 = sharp angles, 1 = very smooth) |
pointSize | number | 0 | Point radius in pixels (0 = hidden) |
lineWidth | number | 1 | Line border width in pixels |
yScale | string | "linear" | Y-axis scale type: "linear" or "log" |
stacked | bool | false | Stack series on top of each other |
grid | bool | true | Show background grid lines |
spanGaps | bool/number/string | true | Connect 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 |
minX | number | auto | Fixed x-axis minimum. On timechart this is a Unix timestamp in milliseconds |
maxX | number | auto | Fixed x-axis maximum. On timechart this is a Unix timestamp in milliseconds |
minY | number | auto | Fixed y-axis minimum. When unset, a linear y-axis begins at zero; setting minY disables that |
maxY | number | auto | Fixed y-axis maximum |
Non-numeric values are ignored. Without minY/maxY the y-axis adds 10% headroom above the data.
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)// Pin the y-axis to 0–100 regardless of the data
metrics
| summarize avg(cpu_percent) by bin(timestamp, 1m), host
| render timechart with (minY = 0, maxY = 100, yUnit = "percent")Bar Chart Options
These options apply to barchart.
| Option | Type | Default | Description |
|---|---|---|---|
stacked | bool | false | Stack bars for grouped data |
horizontal | bool | false | Render bars horizontally |
grid | bool | true | Show background grid lines |
minY | number | auto | Fixed value-axis minimum |
maxY | number | auto | Fixed value-axis maximum |
requests
| summarize count() by region
| render barchart with (horizontal = true, maxY = 1000)Any columns beyond the value and category columns group the result into one series per unique combination of their values, labelled (column: value). Series are drawn side by side per category, or on top of each other with stacked = true.
requests
| summarize count() by statusCode, region
| render barchart with (stacked = true)Pie Chart Options
These options apply to piechart.
| Option | Type | Default | Description |
|---|---|---|---|
kind | string | "pie" | Chart variant: "pie" or "doughnut" |
requests
| summarize count() by method
| render piechart with (kind = "doughnut")Map Chart Options
These options apply to map2d. Option names are case-sensitive.
| Option | Type | Default | Description |
|---|---|---|---|
MapType | string | "cluster" | "cluster" groups nearby points into numbered markers; "heatmap" renders a density heatmap |
Radius | number | 2 | Heatmap point radius in pixels ("heatmap" only) |
BlurRadius | number | 5 | Heatmap blur radius in pixels ("heatmap" only) |
Columns read from each row:
| Column | Type | Required | Description |
|---|---|---|---|
latitude | float64 | yes | Point latitude |
longitude | float64 | yes | Point longitude |
label | any | no | Text shown on a marker that contains a single point ("cluster" only) |
weight | number | no | Point weight for density, default 1 ("heatmap" only) |
locations
| project latitude, longitude, label = name
| render map2devents
| project latitude, longitude, weight = severity / 10.0
| render map2d with (MapType = "heatmap", Radius = 8, BlurRadius = 15)Gantt Chart Options
These options apply to gantt.
| Option | Type | Default | Description |
|---|---|---|---|
rowHeight | number | 36 | Row height in pixels |
tasks
| project name, start, end, group
| render gantt with (rowHeight = 48)Trace Chart Options
These options apply to trace. The timestamp, traceid, parentid, and spanid columns are resolved by the query engine. The remaining columns are resolved by the frontend: an explicit option wins, then the first column whose name (ignoring case, _, -, . and spaces) matches a well-known name.
| Option | Type | Default | Description |
|---|---|---|---|
nameColumn | string | auto | Span display name. Auto-detected from name, spanname, operation, operation_name, displayname, message; otherwise the first string column not used elsewhere |
serviceColumn | string | auto | Service name shown beside the span. Auto-detected from service, service_name, servicename, service.name |
endColumn | string | auto | Span end time (datetime). Auto-detected from end, endtime, end_time, endtimestamp, end_timestamp, endtimeunixnano |
durationColumn | string | auto | Span duration. Auto-detected from duration, duration_ms, duration_millis, duration_milliseconds, duration_ns, duration_us, latency, elapsed |
A span needs either an end column or a duration column. The duration column may be a timespan, or a number whose unit is inferred from the column name: nano/ns = nanoseconds, micro/us = microseconds, sec = seconds, otherwise milliseconds.
spans
| where traceid == "abc123"
| project timestamp, traceid, parentid, spanid, op, svc, elapsed_us
| render trace with (nameColumn = "op", serviceColumn = "svc", durationColumn = "elapsed_us")Stat Chart Options
These options apply to stat.
| Option | Type | Default | Description |
|---|---|---|---|
title | string | none | Title shown above the cards |
unit | string | none | Suffix text shown after each value |
yUnit | string | none | Formats numeric values using the same unit IDs as the axis units (see Supported Units) |
forground | string | theme | Text colour (any CSS colour). The spelling is intentional and kept for backward compatibility |
background | string | theme | Background colour (any CSS colour) |
metrics
| where timestamp > ago(5m)
| summarize avg(cpu)
| render stat with (title = "CPU", unit = "%", forground = "#ffffff", background = "#1e40af")logship.backend.executor.local.schemas.size_bytes
| summarize sum(max)
| render stat with (yUnit = "bytes")Chart Types
timechart
Time series visualization. The x-axis is the first datetime column and the y-axis is the first numeric column (or, failing that, the first timespan column); every other column becomes a series key, so summarize ... by bin(timestamp, 1m), host draws one line per host.
metrics
| where timestamp > ago(1h)
| summarize avg(cpu) by bin(timestamp, 1m)
| render timechartlinechart
Line chart. The x-axis is the first numeric (or timespan) column and the y-axis is the next numeric column; every other column becomes a series key.
range x from 0 to 100 step 1
| extend y = sin(x * pi() / 50)
| render linechartbarchart
Bar chart for comparing values across categories. The value is the first numeric (int, uint, or float) column and the category label is the first non-numeric column, in any order; when every column is numeric the first two are used positionally.
requests
| where timestamp > ago(1d)
| summarize count() by statusCode
| render barchartpiechart
Pie chart showing proportional distribution. The value is the first numeric (int, uint, or float) column and the slice label is the first non-numeric column, in any order.
requests
| where timestamp > ago(1h)
| summarize count() by method
| render piechartmap2d
2D geographic map visualization. Requires latitude and longitude columns of type float64. See Map Chart Options for optional columns.
locations
| project latitude, longitude, label = name
| render map2dgantt
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 gantttrace
Distributed trace visualization for viewing spans in a trace tree. Requires timestamp (datetime), traceid, parentid, and spanid (string) columns, plus an end or duration column. See Trace Chart Options for column detection.
spans
| where traceid == "abc123"
| project timestamp, traceid, parentid, spanid, operationName, duration
| render tracestat
Statistical card display showing key metrics. Shows one card per column of the first row. Requires at least one column.
metrics
| where timestamp > ago(5m)
| summarize avg(cpu), avg(memory), count()
| render stattable
Default table grid display. This is the default when no render operator is specified.
logs
| take 100
| render table