Berserk Docs
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

ValueDescription
tableDefault. Results as a table.
barchartHorizontal bar chart.
timechartLine chart with datetime x-axis.
areachartArea chart.
anomalychartAnomaly detection visualization.
columnchartVertical column chart. unsupported
piechartPie chart. unsupported
linechartLine chart. unsupported
scatterchartScatter plot. unsupported
pivotchartPivot table with chart. unsupported
ladderchartLadder/timeline chart. unsupported
cardSingle-value card display. unsupported

with properties

Visualization properties (only supported for barchart and anomalychart).

PropertyTypeDescription
titlestringTitle of the chart.
xtitlestringTitle for the x-axis.
ytitlestringTitle for the y-axis.
xcolumnstringColumn to use for x-axis.
ycolumnsstringComma-separated columns for y-axis.
seriesstringColumn whose values define series grouping.
kinddefault | unstacked | stacked | stacked100Chart sub-type.
legendvisible | hiddenShow or hide legend.
accumulatetrue | falseAccumulate values.
xaxislinear | logX-axis scale.
yaxislinear | logY-axis scale.
yminnumberMinimum value for y-axis.
ymaxnumberMaximum value for y-axis.
ysplitnone | axes | panelsSplit 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)
7931England
8003England
8452Francia
8665England
9111Francia

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:00Z5
2024-01-02T00:00:00Z12
2024-01-03T00:00:00Z8
2024-01-04T00:00:00Z20

On this page