Recharts, from SQL

Charts

Define a view that returns the shape Recharts expects, tag it with chart metadata, and Supasheet renders an interactive chart with axis controls and legend toggling.

crm - dashboard widgets
May 2026 · live
Revenue (k)area
Pipeline by stagebar
Source mixpie
Activity vs priorline
What it does

The capabilities you get out of the box.

Capability01

Five chart types

Area, bar, line, pie, and radar - pick per view.

Capability02

Series per column

Every numeric column becomes a series with its own color.

Capability03

Time-series ready

Use `date_trunc` and window functions for trends.

How it works

Three steps from SQL to UI.

  1. 01
    Write the SQLA view that returns one X column and one or more Y columns.
  2. 02
    Tag the chart typeJSON in the view comment picks `bar`, `line`, etc.
  3. 03
    Filter from the UICharts inherit the filter bar from the underlying table.
example/charts.sql
sql
-- Pie chart: deals grouped by stage.
create or replace view crm.deals_by_stage_pie
with (security_invoker = true) as
select
  stage::text as label,
  count(*)    as value
from crm.deals
group by stage;

comment on view crm.deals_by_stage_pie is '{
  "type": "chart",
  "name": "Deals by stage",
  "chart_type": "pie"
}';

-- Line chart: weekly pipeline trend, last 8 weeks.
create or replace view crm.pipeline_trend_line
with (security_invoker = true) as
select
  to_char(date_trunc('week', created_at), 'Mon DD') as date,
  count(*)                                          as deals,
  coalesce(sum(value), 0)::bigint                   as pipeline
from crm.deals
where created_at >= current_date - interval '8 weeks'
group by date_trunc('week', created_at)
order by date_trunc('week', created_at);

comment on view crm.pipeline_trend_line is '{
  "type": "chart",
  "name": "Pipeline trend",
  "chart_type": "line"
}';
Get started

Try it on your own Supabase project.

Connect a project, install the Supasheet schema, and your tables are live in minutes.

No credit cardSelf-host or managedMIT licensed