Chart
Server-rendered bar or line marks that follow the theme tokens, with a text and data alternative.
Two fixed series rendered as SVG, with the same values in a native data table.
Each preview is its own Live page in a frame, because this site is a Vue 3.5 app built on the Pulsar starter kit. An open list or popover stays inside its frame; in your application it opens over the page.
Installation
suprnova live:add chartUsage
{% import "suprnova-ui/chart/chart.html" as chart %}
{% call chart::chart("traffic", "Monthly traffic", self.chart_svg()?, "Traffic increased in June.") %}<table><caption>Monthly traffic</caption></table>{% endcall %}Examples
Line chart
Two latency series show token-colored lines and a textual data alternative.
Keyboard and accessibility
suprnova.chart - server-rendered SVG with its data beside it (DATA-004). The island renders the marks through charts-rs and passes them as trusted markup; the figure carries a text summary and a data table in a disclosure, so the canonical document reads without the picture. The island exposes `pub mod filters { pub use suprnova::view::filters::trusted_html; }`. The SVG has a transparent background and no color or font of its own (DATA-007): its text, axis, grid and series carry classes that chart.css colors from `--sn-` tokens, series taking --sn-color-chart-1 to -6 in order and starting again at the seventh, and its text takes the `--sn-font-sans` font chart.css sets on the figure.
API reference
chart
| Parameter | Default | Description |
|---|---|---|
id | Required | The unique figure id, also used for its title. |
title | Required | The figure caption naming the chart. |
svg | Required | Trusted SVG from suprnova::live::charts::render_chart; roles take colors from the theme tokens. |
summary | Required | A text summary that explains the chart without its picture. |
