Skip to content

Results and charts

A successful query returns columns, rows, a total row count, elapsed time, and a truncation flag. The page renders it either as a table or as an ECharts chart, depending on the chart_type you selected.

With chart_type of table, the result renders as a plain table: one column per result column and one row per returned row. NULL values render as empty cells.

Every chart type except table requires at least two result columns; otherwise the endpoint reports an error. The mapping is:

  • Pie — the first column is the slice name, the second is the value.
  • Scatter — the first two columns are the x and y coordinates.
  • Bar / Line — the first column is the x-axis category; every remaining column becomes a series. Lines are drawn smooth.

An empty or unrecognized chart_type is reported as an unknown chart type. There is no chart-specific aggregation: the shape of the chart is exactly the shape of the returned rows, so aggregate or reshape with SQL first when a chart needs it.

max_rows caps the rows returned and defaults to 1000. The result carries a truncated flag and the true row_count, so a truncated result still reports how many rows matched, even when only the first page of them was streamed back.

The result also reports elapsed_ms for the query, which is the backend’s own measurement.