Up to version 0.10, drawing a silverpoint chart meant having a React, Vue, Angular or Reflex application. Version 0.11 drops that requirement with a new package, @silverpoint/embed, and with it come twelve integrations with other tools, which the documentation calls hosts: Power BI, Tableau, KNIME, n8n, Apache Superset, Plone, and Python with Flask, Django, Jupyter and Databricks.
This article opens a second part of the series. It explains the @silverpoint/embed package, and the next eight articles cover each host, one by one. Everything here is silverpoint 0.11.2, released on 28 November 2026, the version in which all twelve integrations were marked as released.
Embed or adapter?
The rule is short:
- If your application is React, Vue, Angular or Reflex, use the usual adapter (
@silverpoint/react,@silverpoint/vue,@silverpoint/angularorreflex-silverpoint-react). - For everything else, use
@silverpoint/embed: a plain HTML page, a server, a workflow node, a BI tool, a notebook or a CMS.
It is not a reduced version. @silverpoint/embed uses the same engine as the adapters, so the drawing, the keyboard reading and the precision mode are the same. The silverpoint MCP server, which we saw in article 28, already draws its charts with it.
npm install @silverpoint/embed
# the standalone files are in node_modules/@silverpoint/embed/dist/:
cp node_modules/@silverpoint/embed/dist/silverpoint-embed.full.js public/vendor/
cp node_modules/@silverpoint/embed/dist/integrity.json public/vendor/
A chart is a spec
One JSON object draws any of the 60 charts. Only chart is required:
{ "chart": "bar-chart",
"data": [{ "team": "A", "wins": 12 }, { "team": "B", "wins": 9 }],
"props": { "xKey": "team", "valueKey": "wins", "title": "Wins" },
"width": 480, "ground": "silverpoint", "substrate": "cream", "mode": "ink", "palette": "sepia" }
| Field | Type | What it is |
|---|---|---|
chart | string, required | The chart's identifier: one of the 60 (bar-chart, donut-chart…) |
data | array | The rows; without them the chart draws its demo data |
props | object | The chart's own props and the common view props (title, badge, dataTable, seed, hatchFill…) |
width / height | number | 160 to 1600 wide and 90 to 1200 high |
ground / substrate | string | silverpoint (with cream, green, blue or ochre) or cyanotype (with prussian) |
mode | ink or precision | Ink by default |
palette | string or object | A palette's name (sepia…) or a palette of your own |
validateSpec says why a spec cannot be drawn: malformed JSON, a field the spec does not have, an unknown chart (with the closest identifiers), an undeclared prop, a size out of range, or a spec over 2 MB, reported with the code SP030.
In a page: one file and one element
In a plain HTML page, one file and one tag are enough. The script defines the <silverpoint-chart> element, which holds the spec inside a <script type="application/json">, and it also mounts every box marked data-sp-embed once the page has loaded:
<script src="/vendor/silverpoint-embed.full.js"
integrity="sha384-…"
crossorigin="anonymous"></script>
<silverpoint-chart>
<script type="application/json">
{ "chart": "donut-chart", "props": { "title": "Budget" } }
</script>
</silverpoint-chart>
<!-- or a box the script mounts once the page is parsed -->
<div data-sp-embed>
<script type="application/json">{ "chart": "line-chart", "width": 480 }</script>
</div>
The script opens no connection, evaluates no text as code and writes nothing to the browser's storage. That is why it works under a strict security policy, script-src 'self'; style-src 'self', and inside an <iframe sandbox="allow-scripts">. You serve the file yourself, with no CDN, and pin it with the SHA-384 hash that integrity.json carries.
| File | What it is | Maximum gzip size |
|---|---|---|
silverpoint-embed.js / .mjs | The script (global Silverpoint) or the ES module | 140 kB |
silverpoint-embed.full.js / .full.mjs | The same with EB Garamond's three cuts inlined | 220 kB |
If the spec is invalid, the page does not break: the chart draws an error figure naming the problem and emits the SP031 diagnostic.
The client API
When the page has to drive the chart, mount(target, spec, options) returns a handle with update, destroy, getGeometry and toSVGString. The onActiveChange, onSelect and onDiagnostic callbacks, and the sp-activechange, sp-select and sp-diagnostic events, which bubble up the DOM, report what the reader does. hostAppearance picks the ground, the substrate and the mode that best suit the background of the tool hosting the chart.
import { mount, hostAppearance } from '@silverpoint/embed/client';
const chart = mount(document.querySelector('#hits'), {
chart: 'line-chart',
data: rows,
props: { xKey: 'hour', valueKey: 'hits', title: 'Hits per hour' },
}, {
// the host's theme, under the spec's own fields
appearance: hostAppearance({ background: '#0b2a4a' }),
onActiveChange: (item) => console.log(item?.datum, item?.value),
onSelect: (item) => console.log('selected', item.datum),
});
chart.update({ chart: 'line-chart', data: newRows });
const svg = chart.toSVGString({ standalone: true }); // the ground's stylesheet inside
chart.destroy();
// or listen to the bubbling events of every chart on the page
document.addEventListener('sp-activechange', (event) => console.log(event.detail));
On a server or in a flow
renderToSVG and renderToHTML run in Node with no DOM and return exactly the same bytes for the same spec. renderToHTML writes the chart's accessible root, complete even with no script; with the interactive option it adds the spec as JSON for a client on the page to adopt.
import { renderToHTML, renderToSVG, validateSpec } from '@silverpoint/embed';
const checked = validateSpec(input); // why a spec cannot render, before rendering it
if (!checked.ok) throw new Error(checked.error.message);
const svg = renderToSVG({ chart: 'line-chart', props: { title: 'Hits' } });
if (svg.ok) writeFileSync('hits.svg', svg.value.svg); // the MCP server's render_chart
// a whole document, complete with no script; `interactive` adds the spec for a client to adopt
const page = renderToHTML({ chart: 'line-chart' }, { as: 'document' });
From a table: the host catalog
BI tools, workflows and CMSs do not think in React props: they think in tables and columns. For them there is host-catalog.json, which describes every chart a table can feed: its roles (dimension, measure and temporal), its options and the appearance values. With it, a BI tool's property pane is generated, not written by hand.
specFromTable binds a table's columns to a chart's roles. It only binds: it does not aggregate, sort or filter; the tool does that.
import { HOST_CATALOG, specFromTable } from '@silverpoint/embed/hosts';
const spec = specFromTable({
chart: 'heatmap-chart',
table: { rows: [{ day: 'Mon', hour: '09', load: 12 }, { day: 'Mon', hour: '10', load: 34 }] },
roles: { row: 'day', column: 'hour', value: 'load' },
});
Four charts are not fed from a table: the orbit, the sparkline rows, the volvelle and the grid treemap. That is why the BI integrations talk about 56 charts, not 60.
The twelve integrations
| Host | Kind | Through | Package | Article |
|---|---|---|---|---|
| Python | language | embed | silverpoint | 31 |
| Jupyter | notebook | python | silverpoint | 31 |
| Databricks | notebook | python | silverpoint | 31 |
| Flask | web | python | silverpoint[flask] | 32 |
| Django | web | python | silverpoint[django] | 32 |
| KNIME | workflow | python | silverpoint-knime | 33 |
| n8n | workflow | embed | n8n-nodes-silverpoint | 34 |
| Apache Superset | BI | react | superset-plugin-chart-silverpoint | 35 |
| Plone Volto | CMS | react | volto-silverpoint | 36 |
| Plone Classic UI | CMS | python | collective.silverpoint | 36 |
| Power BI | BI | embed | silverpoint-powerbi | 37 |
| Tableau | BI | embed | silverpoint-tableau | 38 |
The "Through" column says what draws in each case: embed is this package directly, python is the Python package (which carries the @silverpoint/embed standalone file of its same version) and react is the React adapter with the specFromTable function.
Proving a host draws correctly
Every integration runs the conformance kit against the file it ships and in the runtime it ships it in: one case per chart plus the appearance axes on four charts, with a SHA-256 per render.
import { conformance } from '@silverpoint/embed/conformance';
import { renderToSVG } from '@silverpoint/embed';
const { passed, failed } = await conformance((spec) => {
const result = renderToSVG(spec);
return result.ok ? result.value.svg : '';
});
Embed and AI assistants
The MCP server writes the page for you: generate_code with framework: "html" returns the <script> tag with its integrity and a <silverpoint-chart>. search_catalog finds the integrations, and the silverpoint skill includes references/hosts.md.
{ "name": "generate_code",
"arguments": { "target": { "chart": "donut-chart" }, "framework": "html" } }
The presentation
If you prefer a visual tour, the documentation site has a presentation of silverpoint written in Markdown with Marp syntax and drawn by the library's own slide-deck component, sp_deck, with live charts. Its chapters: what silverpoint is, React, Vue and Angular, Reflex, the 60 charts and 38 components, slide decks, the MCP server and skills, and the embed engine with its hosts. The Markdown can be downloaded from the same page.
Next
- The official guide: Embed in any page, with a live demo.
- The package on npm: @silverpoint/embed.
- The next article, 31, takes all this to Python: DataFrames, Jupyter and Databricks.