Chart

functional

Turn any result set into a chart without leaving the grid - and start from a suggested setup when the decision model is on.

Every result grid carries a Chart tab next to Grid and Pivot. Build bar, line, area, scatter, histogram, pie, and donut charts from the current result set in a configuration sidebar - chart kind, category column, numeric value series, aggregation, ordering, and a top-N cap, instead of relying only on inferred defaults. Click the tab, or right-click a cell in the grid and choose Tools › Chart….

  • Honest gaps - NULL values stay explicit gaps rather than silently becoming zeros.
  • Every row counts - there is no row limit. Sums, averages, counts, and histogram bins use every row of the result, even one too large to keep in memory. What a chart draws stays readable: at most 200 categories and 4 series, and a line, area, or scatter chart of more rows than it can draw keeps the overall shape, spikes and dips included, in a few hundred points. A Showing… note says whenever a cap thinned anything, instead of stalling or quietly truncating.
  • Take it along - Copy SVG puts the chart on the clipboard as SVG markup, and Save SVG… writes it to a .svg file (desktop only).
  • Connected to the grid - click a bar, point, slice, or bin to jump to the rows that drive it; a sidebar checkbox turns that click-to-navigate behavior off.
SQLly
SQLly chart tab with configuration sidebarSQLly chart tab with configuration sidebar
The Chart tab: a configuration sidebar for kind, columns, aggregation, and ordering, with the rendered chart beside it.

A walkthrough: revenue by region

SELECT r.name AS region,
       SUM(o.total) AS revenue,
       COUNT(*) AS orders
FROM sales.orders o
JOIN sales.regions r ON r.region_id = o.region_id
WHERE o.order_date >= '2026-01-01'
GROUP BY r.name;
  1. Open the Chart tab. With nothing configured, Category is on Auto, which picks region - the first text column, and every numeric column is plotted, so you get grouped bars for revenue and orders.
  2. Revenue runs to millions and orders to thousands, so the order bars are slivers. Untick orders under Values.
  3. Set Order to Value high–low to rank the regions, and click Limit to step through Top 10, 25, 50, 100, and 200.
  4. Try Donut under Type for each region's share, then click a slice to land on the Grid tab with that region's row selected.

You can also chart rows that are not grouped yet. Run the raw region, total rows instead and set Aggregate to Sum: rows with the same label collapse into one category. With Aggregate on None every row is its own category, even when labels repeat.

The sidebar

SectionWhat it holds
TypeBar (the default), Line, Area, Scatter, Histogram, Pie, Donut.
DataCategory (Auto or any column), Values (the numeric columns - at least one stays ticked), Aggregate (None, Sum, Average, Minimum, Maximum, Count of non-null values), Order (Source, Category A–Z, or Value high–low by the first series), and Limit.
BehaviorClick marks to show source rows.
ExportCopy SVG and Save SVG….

A histogram bins a single numeric column, the first ticked one, so it hides Category, Aggregate, Order, and Limit. Click a legend entry above the chart to hide or show that series (or slice, for pie and donut); the last visible entry stays on.

Edge cases worth knowing

  • What counts as numeric. A column is numeric when every non-NULL value is a number, including numbers that arrive as text, such as money and decimal values. Booleans are not. A numeric year column is therefore plotted as a series, and with no text column the categories become row numbers. Pick year under Category and untick it under Values, or name both in the directive: label:year; values:revenue. Casting it to text does not help - numbers in text still count as numbers.
  • NULLs. A NULL value is a gap; a NULL label becomes a category called NULL.
  • Pie and donut need exactly one series, at most 16 categories, no negative values, and at least one positive one. Otherwise the chart says which rule failed.
  • The chart reads the result as returned. Sorting or filtering the Grid tab does not change it; shape the data in the query instead.
  • Large results. The Chart tab waits until the query finishes. A set large enough to spill to disk charts like any other: SQLly reads the file on a background task, shows Charting… with a percentage, and keeps memory flat. Clicking a bar, slice, or histogram bin gathers the rows behind it in the background and opens them on the Grid tab under a banner; on a line or scatter chart a click jumps to the point's row.

Keeping a chart

The disk icon in the Type header saves the setup into your SQL as a -- sqlly chart: comment, replacing the last one if there is one. Add -- sqlly view: chart as the first line and the result opens on the Chart tab every run. To keep a chart outside the file, choose Tools › Save Chart to Library… from the grid's right-click menu (or the Save chart to library… chip while the Chart tab is showing); it then appears under Tools › Saved Charts and on the Chart Dashboard, in the desktop app.

A suggested first chart

With the optional decision model enabled, opening the Chart tab on an unconfigured result starts from a suggested chart kind, label column, and value series, marked “Suggested chart” with a one-click Revert. Only the result's column names and types are sent to choose it; a chart layout you saved or asked for in the query always wins, and with the model off nothing is sent and charts behave exactly as before.