Tabular OperatorsOther Operators
render
Renders results using a specified visualization type.
Renders results using a specified visualization type. The render operator must be the last operator in the query and only affects how results are displayed.
Syntax
render visualization [with (property = value, ...)]Render results using specified chart type
visualization
Chart type
| Value | Description |
|---|---|
table | Default. Results as a table. |
barchart | Horizontal bar chart. |
timechart | Line chart with datetime x-axis. |
areachart | Area chart. |
anomalychart | Anomaly detection visualization. |
columnchart | Vertical column chart. unsupported |
piechart | Pie chart. unsupported |
linechart | Line chart. unsupported |
scatterchart | Scatter plot. unsupported |
pivotchart | Pivot table with chart. unsupported |
ladderchart | Ladder/timeline chart. unsupported |
card | Single-value card display. unsupported |
with properties
Visualization properties (only supported for barchart and anomalychart).
| Property | Type | Description |
|---|---|---|
title | string | Title of the chart. |
xtitle | string | Title for the x-axis. |
ytitle | string | Title for the y-axis. |
xcolumn | string | Column to use for x-axis. |
ycolumns | string | Comma-separated columns for y-axis. |
series | string | Column whose values define series grouping. |
kind | default | unstacked | stacked | stacked100 | Chart sub-type. |
legend | visible | hidden | Show or hide legend. |
accumulate | true | false | Accumulate values. |
xaxis | linear | log | X-axis scale. |
yaxis | linear | log | Y-axis scale. |
ymin | number | Minimum value for y-axis. |
ymax | number | Maximum value for y-axis. |
ysplit | none | axes | panels | Split y-axis. |
Examples
Example 1
datatable(year:long, raids:long, region:string)[
793, 1, "England",
800, 3, "England",
845, 2, "Francia",
866, 5, "England",
911, 1, "Francia"
]
| render barchart with (title = "Viking Raids by Year")| year (long) | raids (long) | region (string) |
|---|---|---|
| 793 | 1 | England |
| 800 | 3 | England |
| 845 | 2 | Francia |
| 866 | 5 | England |
| 911 | 1 | Francia |
Example 2
datatable(ts:datetime, ships:long)[
datetime(2024-01-01), 5,
datetime(2024-01-02), 12,
datetime(2024-01-03), 8,
datetime(2024-01-04), 20
]
| render timechart| ts (datetime) | ships (long) |
|---|---|
| 2024-01-01T00:00:00Z | 5 |
| 2024-01-02T00:00:00Z | 12 |
| 2024-01-03T00:00:00Z | 8 |
| 2024-01-04T00:00:00Z | 20 |