BI Components vs Evidence¶
Evidence and BI Components start from the same idea: a dashboard is a short text file, made of tags such as "a bar chart of sum(revenue) by country", and each tag writes its own query. Both are open source (MIT), both draw with Apache ECharts, and both are designed so that a language model can write the dashboard.
They differ in what you get at the end:
- Evidence is an application. You write Markdown pages in a project, and Evidence serves them as a reporting site for your team: navigation, sign-in, PDF export, scheduled e-mails, an AI agent. It is a BI tool, with a hosted platform (Evidence Studio) on top of the open-source framework (Evidence Core).
- BI Components is a library. It gives you HTML tags to put in a page of your own application. Your application keeps its sign-in, its API and its rules, and the dashboard can be written by someone you do not trust: a model, or one of your customers.
| Choose Evidence | Choose BI Components | |
|---|---|---|
| You are building | A reporting site for your company | Dashboards inside your own product or site |
| Who writes dashboards | Your data team, with an agent | Your developers, your users, or a model answering a user |
| Who reads them | Colleagues who sign in to Evidence | The users of your application, already signed in to it |
| Who answers the queries | Evidence, on your warehouse | Your backend, or the browser (DuckDB-WASM) |
| You want | A finished tool, with as little to build as possible | Building blocks, with as little to adopt as possible |
This page was written in December 2026, from the source of Evidence Core (CLI 0.12.2), its documentation and its website. Evidence moves fast: check its documentation for what changed since.
The same dashboard, twice¶
---
title: Sales
---
{% range_calendar id="period" default_range="last 12 months" /%}
{% dropdown id="channel" data="shop.orders" value_column="channel" /%}
{% big_value
data="shop.orders"
value="sum(revenue)"
fmt="eur"
filters=["channel"]
date_range={ date="date" range={{period}} }
comparison={ compare_vs="prior year" }
/%}
{% bar_chart
data="shop.orders"
x="country"
y="sum(revenue)"
filters=["channel"]
date_range={ date="date" range={{period}} }
/%}
A file of an Evidence project. evidence dev or Evidence Studio displays it.
<source-api url="/api/queries"></source-api>
<date-range-filter default="365d"></date-range-filter>
<ui-filter dimension="channel"></ui-filter>
<score-card measure="revenue" compare="yoy"></score-card>
<bar-chart measure="revenue" by="country"></bar-chart>
<script src="https://unytics.io/bi-components/dist/bi-components.js" defer></script>
A piece of any HTML page. Your endpoint /api/queries answers. Filters apply to every component of the page, and a click on a bar filters the others.
What each one does¶
| Evidence | BI Components | |
|---|---|---|
| A dashboard is | A Markdown file with Markdoc tags and SQL blocks | HTML, with custom elements |
| Text around the charts | Markdown, with values and variables inside sentences | HTML |
| Charts | About 20: bar, line, area, combo, scatter, bubble, pie, funnel, heatmap, calendar, histogram, waterfall, sankey, chord, treemap, radar, candlestick, sparkline, maps | Bar, line, pie, doughnut. Others with your own ECharts code |
| Tables | Pivots, subtotals, search, pages, bars and sparklines in cells, conditional colors | One sortable table with several dimensions and measures |
| Key figures | Value, comparison with a period, a target or a benchmark, sparkline | Value, comparison with a period |
| Filters | Dropdown, buttons, slider, text, toggle, calendar, filter builder. A chart names the filters it follows. | Period, select, buttons, toggle. Every component follows every filter. |
| Click on a chart to filter the page | No (a grid of values, dimension_grid, does it) |
Yes, on every chart and table |
| Named measures | metrics/*.yaml, read by the page |
Any semantic layer your server has: the page only sends names |
| Data | 11 warehouses, queried live. In Studio, 130+ sources synced to a managed ClickHouse | Files in the browser (CSV, Parquet, JSON), or whatever your backend can query |
| Export | Excel, PDF, PNG. Scheduled e-mails and Slack messages (Studio) | None |
| Sign-in and rights | Open source: one shared password. Studio: SSO, access per page, row-level security | Those of your application |
| Show it in your product | An <iframe> on a page hosted by Studio (Enterprise plan) |
Tags in your page, or a sandboxed frame your page creates |
| Dashboards written by a model | Evidence Agent in Studio, or a coding agent with the CLI | In your own chat: Generative AI |
| To run it | The evidence server (one binary, or Docker), or Studio |
A <script> tag. No server of its own. |
| Price | Core: free. Studio: from $2,500 a month | Free |
When to use which¶
You want a place where your company reads its numbers. Use Evidence. Reports are files in Git, reviewed in pull requests, published on a site with a menu, a search and a PDF button. Building this with BI Components means writing the site yourself.
You want charts inside your product, for your customers. Use BI Components. The tags go in your pages, next to your own interface, with your styles. Each query goes to your API with the session of your user, so the rules you already have apply. Evidence does this with an iframe on a page hosted by Studio, on the Enterprise plan: your backend asks Studio for a single-use address for each viewer. The self-hosted server cannot be shown in an iframe at all (it answers X-Frame-Options: DENY), and serves the same data to everyone.
Your users ask questions in a chat, and a model answers with a dashboard. Use BI Components. It was designed for this case: the answer is HTML your application shows in a sandbox, where it can only ask for what your server allows this user to see. Evidence has an agent too, for the people who sign in to Evidence Studio.
You have a CSV or Parquet file and no server. Use BI Components: a static page queries the file in the browser. Evidence no longer does this. Its first version built a static site with DuckDB-WASM; the current one needs a warehouse and a running server.
You need pivot tables, maps, a waterfall, an Excel export next week. Use Evidence. Its component library is much larger: see what Evidence has that BI Components does not.
You write long reports, with text and figures mixed. Use Evidence. Markdown is made for it: a value in a sentence, a section repeated for each region, a paragraph shown only when a query has rows.
You already have an application in React, Vue, Streamlit or plain HTML. Use BI Components: the tags work where HTML works. Evidence tags only exist inside an Evidence project.
The two also work together: Evidence for the internal reports of the data team, BI Components for what customers see in the product.
Technical choices¶
Markdoc tags or custom elements¶
Both projects needed a format a person, and a model, can write without making the page dangerous. They made opposite choices.
Evidence wrote a language. A page is parsed by Markdoc into a tree, checked against a schema, and rendered by Svelte components. The first version of Evidence used Svelte syntax directly, and a page could contain JavaScript; the new one "expresses config, not code".
- A page can be checked without being displayed:
evidence validatereports an unknown tag, a wrong attribute or a SQL error. An agent gets a list of errors to fix before anyone opens the page. - Nothing in a page runs as code. JavaScript is only possible in three tags (
html,custom_echart,custom_map), each in its own sandboxed frame. - The language has what a document needs:
{{ variables }},{% if %},{% repeat %}, partials, and components of your own written as Markdoc templates. - The price is that the tags mean something only to Evidence. Displaying a page takes its parser, its renderer and its server.
BI Components used the language of the browser. <bar-chart> is a custom element: the browser parses it and runs it, as it does for <video>.
- There is nothing to build and nothing to adopt. The same tag works in a static file, a React component, a Markdown site, a Streamlit app.
- Layout and text are HTML and CSS, which models write better than anything else, and which need no documentation.
- A dashboard may contain scripts. This is useful (a custom chart is twenty lines), and it is why a dashboard written by someone else must run in a sandbox.
- The price is that HTML is checked late. A misspelled attribute is ignored by the browser, and a wrong measure shows its error in the component, when the page is displayed. There is no
validatecommand yet.
What a query is, and who checks it¶
In both, a tag holds SQL expressions (sum(revenue), country), or names of measures defined elsewhere. What happens next differs.
| Evidence Core | BI Components | |
|---|---|---|
| The tag becomes | A complete SQL statement, written in the browser for the dialect of the warehouse | A description: table or mode, measures, dimensions, filters, period |
| Sent to | POST /api/query, as SQL text |
Your endpoint, or the page that holds the sandbox |
| Checked by | Nothing: the server runs the statement with the identity of connection.yaml |
Your server. In a sandbox, the page first: one expression each, no statement, no sub-query, a list of safe functions |
| SQL is written by | The browser | Your server (compileSQL), or it is not SQL at all |
| Named measures | Their YAML is sent to the browser, which turns them into SQL | Only their names leave the browser |
| Requests | One per component | One per render: the queries of a page are grouped |
The choice of Evidence is consistent with what it is: an internal tool where every person who signs in may read what the warehouse identity can read, and where authors write SQL freely in the page anyway. Its documentation says that a self-hosted site serves the same reports and the same data to every viewer. Rights per viewer exist in Studio, enforced by its query engine or by the warehouse (Snowflake session variables, BigQuery impersonation).
The choice of BI Components comes from the opposite case: the reader is a customer, and the author may be a model. A query is data to check against a dictionary, never a statement to run, and the server that answers is yours.
Sandboxing¶
Both use the same browser mechanism, an <iframe sandbox="allow-scripts"> with a strict content security policy and messages to the page around it. They do not put the same thing in it.
| Evidence | BI Components | |
|---|---|---|
| What runs in the frame | One block of a page: html, custom_echart with functions, custom_map |
The whole dashboard |
| What stays outside | The page, its tags and its SQL: no code to isolate | The application that shows the dashboard |
| Data enters the frame by | evidence.query("name"): a query the author declared on the page |
dashboard.query(...), and every tag: each query is checked by the page, then by your server |
| Network from the frame | html: a fixed list of script CDNs, map tiles and public data hosts. custom_echart: none. |
None, except the files the page names one by one |
| Leaving with the data | Links open only hosts written in the block | A second frame stops navigation; no pop-ups, forms or downloads |
| The author is trusted with | SQL: any query the warehouse identity allows | Nothing: only what the viewer may see |
Evidence protects the page from a piece of script: the author is a colleague, and the code may come from an agent or a CDN. BI Components protects the application and the viewer from the dashboard: the author may be hostile. That is why its sandbox holds everything, including the tags, and why what crosses the border is a query to validate rather than a result to display.
One thing is common to both, and worth copying from either: the API given to custom code is nearly the same. evidence.query, evidence.filters, evidence.subscribe and evidence.theme on one side; dashboard.query, dashboard.filters, dashboard.subscribe and dashboard.theme on the other.
Filters¶
In Evidence, an input creates a variable ({% dropdown id="channel" %}), and each chart says which ones it follows: filters=["channel"], or where="channel = {{channel}}". It is explicit, and it lets two charts of a page ignore each other. The selection is kept in the address of the page.
In BI Components, the selection belongs to the page: every component follows every filter, and a click on a bar is a filter too. A dashboard is shorter to write, and exploring it needs no input at all. The selection is not kept in the address: the page that holds the dashboard can read and set it.
Running it¶
Evidence Core is one binary of about 50 MB (SvelteKit and Svelte 5, compiled with Bun). evidence dev previews a project, evidence serve is the production server, behind a shared password or your own proxy. Pages are rendered on each request, and queries run live on the warehouse: no build step, and no static export any more.
BI Components is one JavaScript file, about 400 KB compressed with ECharts. It is served by a CDN or bundled by your application. What answers the queries is DuckDB-WASM in the browser, or the backend you already run, with one more endpoint.
What Evidence has that BI Components does not¶
Not counting what makes Evidence a platform (hosting, sign-in, a warehouse, connectors, an editor, scheduled e-mails), which BI Components leaves to your application on purpose. The list below is what a component library could have, and does not have today.
Charts
- Area, scatter, bubble, heatmap, funnel, histogram, waterfall, sankey, treemap, radar, calendar heatmap, sparkline, maps.
- Several measures in one chart, and a combo chart: bars and lines together, on two axes.
- Annotations: a reference line (a target), an area (a promotion), a point with a label.
- A bar chart stacked to 100%.
- Tags for the usual settings: subtitle, information icon, data labels, axis bounds and titles, missing values, zoom. BI Components has only
title,heightandhide-axis-names. - More rows in a tooltip: other measures for the same bar.
Tables
- Pivots: dimensions in columns.
- Total and subtotal rows, groups that open and close. Totals are computed again by the database, so a ratio or a distinct count is right.
- Search, and pages.
- In a cell: a bar, a color scale, a variation, a sparkline. Conditional colors for a row.
- A link per row, images, groups of columns, frozen columns.
Key figures
- A comparison with a target, or with a benchmark (the average of the other stores of the region).
- A sparkline in the card.
- Thresholds: progress bars, a grid of colored cells.
- A comparison when the tag holds SQL expressions.
compareonly works with named measures today.
Filters and periods
- A slider, a text field, a search in a long dropdown, dropdowns that depend on each other.
- A filter builder: several conditions on the columns of a table.
- A bar of filters that stays visible when the page scrolls.
- Calendar periods: "last month", "this quarter", "previous year", fiscal years. BI Components has days back, month to date and year to date.
- More time grains (hour), and seasonality: by day of week, by month of year.
- A period per component, different from the one of the page.
- The selection kept in the address of the page, to share a filtered view.
Measures
- A file format for measures. Evidence's
metrics/*.yamlholds, for each measure, its SQL, its own filter, its format, its label, a description and synonyms for the model; a measure can be computed from others ({revenue} / {orders}). BI Components leaves the dictionary to your server, and only shows an example of one. - The same compiler outside JavaScript.
compileSQLhas no Python version. - SQL for several dialects.
compileSQLwrites DuckDB SQL.
Writing and checking a dashboard
- A validator: check a dashboard without displaying it (unknown tag or attribute, wrong value, unknown table or measure), and return errors a model can fix. It is the most useful thing Evidence built for agents.
- Documentation for agents: a command line and an MCP server that search the documentation and return the attributes of a component.
- Autocompletion of tags and attributes in an editor.
Text and layout
- A block repeated for each value of a dimension: small multiples, one section per region.
- A block shown only when a query has rows.
- Components of your own made of other components, with typed attributes.
- Tabs, accordions and a dialog as tags. In BI Components these are HTML and CSS.
- Translations of the text of a dashboard.
Export and print
- A button to download the data of a chart or a table (Excel).
- A chart as an image.
- A page that prints well: page breaks, blocks kept together, content for print only.
Custom code in a sandbox
- A list of allowed hosts for scripts and map tiles, set once. BI Components takes the files one by one, in
resources. - A dialog over the whole page, opened from the frame.
- Links from the frame to named hosts, opened by the page.
Refresh
- A component, or a page, that asks again every N seconds.
What BI Components has that Evidence does not¶
- It lives in your page. No iframe, no second application: tags in your DOM, styled by your CSS, in any framework.
- It has no server. A static page queries a file in the browser; with a backend, one endpoint answers.
- The viewer is your user. No second list of accounts, no synchronization of rights: each query arrives at your API with the session of your application.
- The whole dashboard can be untrusted. The sandbox holds the HTML and the scripts, and every query is checked before it reaches your engine.
- Queries are not SQL statements. A server can answer from a semantic layer, an API or a cache, without running SQL written by a browser.
- Click to filter. Every chart and table filters the page, with no attribute to write.
- One request per render, however many components the page has.