Elyra
Elyra The coding agent eTerm The terminal that knows where each command ends Huskarl AI colleagues on your own Mac Starf An activity monitor for Apple silicon that never invents a number etrans An SSH and SFTP client for macOS Elyra VM Virtual machines for macOS, Linux and Windows on your Mac Litr A small, native web browser for macOS Notr A notebook for macOS e The native code editor Elyra Grove Native local development environment Askr The real server for Laravel & PHP Elyra Framework Rust + Svelte 5 framework for desktop apps Elyra Conductor Local project conductor Refr Local-first PDF workspace for macOS Elyra Workspace A desktop workspace for coding agents eDock A container runtime for the Mac Elyra SQL Server MySQL-compatible SQL server in Rust Elyra Félagi Agents as teammates on one board Elyra SQL Client Native desktop SQL workbench Elyra SQL Anywhere Replication-ready SQL engine Elyra Sjá SEO & GEO workspace for macOS Elyra DataGrid Server-driven data grid for Laravel
Reference
Ratatosk CLI
Roadmap
RFC 0001: make:resource
RFC 0002: live queries
RFC 0003: MCP server
RFC 0004: MCP resource templates
RFC 0005: a Laravel backend
RFC 0006: Laravel broadcasting
RFC 0007: offline and sync
RFC 0008: Laravel notifications
RFC 0009: Files
RFC 0010: Laravel abilities
RFC 0011: an assistant in the app
RFC 0012: @elyra/ui
RFC 0013: the assistant sees the window
RFC 0014: Elyra Inspector
RFC 0015: presence
RFC 0016: capabilities per window
RFC 0017: record invalidation
RFC 0018: the assistant's answer, streamed
RFC 0019: a window from the tray
RFC 0020: an app that stays in the tray
RFC 0021: a server chosen at sign-in
RFC 0022: signed in to more than one server
RFC 0023: private channels a window listens to
RFC 0024: updates from the backend
RFC 0025: commands and configuration
RFC 0026: the running app, for coding agents
RFC 0027: the assistant's code mode
RFC 0028: the tray's icon, and the app's
RFC 0029: installers
RFC 0030: the app's identity on Windows
RFC 0031: a token per workspace
RFC 0032: the microphone
RFC 0033: diagnostics the user can send
RFC 0034: one screen in several states at once
RFC 0035: point at it, and hand it to the agent
RFC 0036: rata check, the app checked as a whole
RFC 0037: Theme Studio
RFC 0038: edit it in its own app
RFC 0039: a write shown at once in every window
RFC 0040: the two halves agree
RFC 0041: Quick Look
RFC 0042: follow a colleague
RFC 0043: every write seen
RFC 0044: composite keys
RFC 0045: bigint all the way
RFC 0046: pivot columns
RFC 0047: relations on any key
RFC 0048: more providers
RFC 0049: OpenAI web search
RFC 0050: integer-keyed arguments
RFC 0051: citations
RFC 0052: open documents
RFC 0053: exit hooks
RFC 0054: the gui feature
RFC 0055: menus that change
RFC 0056: the framework's own words
RFC 0057: rata upgrade
RFC 0058: @elyra/charts
RFC 0059: all of WireCharts
RFC 0060: exporting a chart
RFC 0061: zoom
RFC 0062: printing
RFC 0063: linked charts
RFC 0064: report pages
RFC 0065: marks
RFC 0066: taking a table out
RFC 0067: totals
RFC 0068: columns the user picks
RFC 0069: filters
RFC 0070: saved views
RFC 0071: lists over Laravel
RFC 0072: targets
RFC 0073: every row out
RFC 0074: grouped rows
RFC 0075: pinned columns
RFC 0076: views on the server
RFC 0077: every match selected
RFC 0078: editing in the table
RFC 0079: many cells at once
RFC 0080: a value for the selected rows
RFC 0081: a new row in the table
RFC 0082: a related record in a cell
RFC 0083: a filter by a related record
RFC 0084: one write for many rows
RFC 0085: the keys shown
RFC 0086: many rows in Laravel
RFC 0087: many rows deleted
RFC 0088: the trash
Release notes
Changelog
Elyra
RFC 0058 — `@elyra/charts`: charts that know the app

RFC 0058 — @elyra/charts: charts that know the app

Status: implemented (2026-11-26) · Target: 0.58.0 · builds on @elyra/ui, live queries and the framework's own words · see Decisions

Summary

@elyra/ui has a Sparkline and a Stat, and nothing bigger. An app that needs a real chart (revenue by month, a pie of open cases, hours per person) adds a chart library by hand and wires all of this itself:

  • the theme, so the chart follows dark mode and the design tokens;
  • a live query, so the chart updates when a record changes;
  • loading, error and empty states;
  • the locale's number formats;
  • what a screen reader hears.

Every app does that differently.

This RFC adds a package of its own, @elyra/charts. It has Svelte components on ECharts, tree-shaken, so an app only ships the charts it uses. Their data has the same shape as WireCharts' (series and categories), so a Laravel endpoint that already feeds WireCharts feeds these unchanged.

<script>
  import { LineChart, PieChart } from "@elyra/charts";
  import { live } from "./bindings";
</script>

<LineChart
  series={[{ name: "Revenue", data: [120, 180, 150, 260] }]}
  categories={["Jan", "Feb", "Mar", "Apr"]}
  smooth
/>

<!-- A live query: the chart redraws when a record changes, with
     a skeleton while it loads and a callout if it fails. -->
<PieChart live={live.cases_by_status()} donut />
  • The data contract is WireCharts':
    • series is [{ name, data }]. A plain list of numbers is one series.
    • categories is the x axis.
    • smooth, stack, horizontal and legend are plain props, the same in Blade and Svelte.
  • The first charts are WireCharts' free ones: LineChart, AreaChart, ColumnChart, BarChart, PieChart (with donut) and ScatterChart. <Chart option={…}> takes any ECharts option for the rest.
  • The tokens:
    • The charts follow the app's theme, including dark, light, more contrast and the Theme Studio.
    • Eight new series tokens, --elyra-chart-1 to --elyra-chart-8, are checked for contrast against --elyra-surface.
  • Live queries: live takes what Table's page takes, a live store, a Live or a plain value. The chart moves to the new data instead of redrawing from scratch.
  • Accessibility and the assistant:
    • Every chart has a summary as its label, like Sparkline's.
    • Every chart also has its data as a visually hidden table. Screen readers read it, and so does the assistant, which sees the window (RFC 0013).
  • The app's language: its words are elyra.charts.* (RFC 0056), and its numbers and dates are formatted in the app's locale.

Motivation

  • Dogfood. WireCharts is a sister project: charts for Laravel Livewire, on ECharts. An Elyra app with a Laravel half has endpoints that build WireCharts' series already, and the desktop should draw the same data without translating it.
  • A chart is where live queries show. A table over a live query updates one row. A chart over one moves every bar. Nothing in the framework connects the two today.
  • The theme can't be borrowed. ECharts takes colours as values, not CSS variables. Each app has to read the tokens and redraw on a theme change, and most don't, so the chart stays light in a dark window.
  • A canvas is silent. A chart drawn to a canvas says nothing to a screen reader or to the assistant asked "what was revenue in March?".

Current state (0.57)

  • @elyra/ui: Sparkline (plain SVG: line, area, bars, tones, an aria-label summary) and Stat (a value, its change and a sparkline). No axes, legends, tooltips or more than one series.
  • Table takes a live query's { value, error, loading } and shows Skeleton, Callout and Empty for it. That's the pattern to follow.
  • The tokens (ui/src/tokens.css) have accent, success, warning and danger, but no colours for a chart's series.
  • The release has two tarballs, elyra-runtime-X.tgz and elyra-ui-X.tgz.

Design

The package

The package is charts/ in the repository, and it ships as a third tarball, elyra-charts-X.tgz, made the same way as ui/:

  • It ships its sources, so a checkout needs no build step.
  • @elyra/ui and @elyra/runtime are peers at the same version.
  • echarts is a dependency with an exact version.

rata new --charts adds it, and rata upgrade (RFC 0057) moves it with the others.

The components

Component ECharts Props beyond the shared ones
LineChart line smooth, step, stack, area
AreaChart line + areaStyle smooth, stack, percent
ColumnChart bar stack, percent
BarChart bar, axes swapped stack, percent
PieChart pie donut, rose
ScatterChart scatter size (a series' third value as the bubble size)
Chart anything option, merged over the theme

The props every chart shares:

  • the data: series, categories and live;
  • the layout: height (default 320), legend, tooltip, label;
  • the formatting: format (a value as text) and locale;
  • renderer (svg, or canvas for many points);
  • the callbacks: onselect ({ series, category, value }, so a click on a bar can open the record), labels and class.

Each component imports only its own ECharts chart and the components it needs (echarts/core, echarts/charts, echarts/components), so an app that only uses PieChart doesn't ship the line chart's code.

The data

The data is WireCharts' contract:

  • Series: series is a list of { name, data, …extra }. A bare list of numbers is one series without a name.
  • Points: data holds numbers, or { name, value } pairs for a pie, or [x, y] pairs for a scatter.
  • The x axis: categories is a list of strings, or ISO dates, which then become a time axis.
  • Other options: anything else on a series (stack, yAxisIndex, itemStyle) is passed to ECharts as it is.

live takes what Table's page takes. The value is the series, or { series, categories }, which is what a chart command returns:

#[command(live, can = "reports.view")]
async fn revenue_by_month(ctx: Ctx) -> Result<ChartData> { … }

elyra::charts::ChartData { series: Vec<Series>, categories: Vec<String> } is a small type in the framework, so a command and rata codegen agree on the shape. A Laravel endpoint that returns the same arrays decodes into it.

The theme

The chart builds an ECharts theme from the tokens it reads off its own element, with getComputedStyle, so a token overridden on a section counts too. The theme takes:

  • the text, muted and border colours;
  • --elyra-surface for the tooltip;
  • --elyra-font;
  • the eight chart tokens;
  • the durations, with no animation under prefers-reduced-motion.

The chart rebuilds the theme when the theme changes, which means data-theme on <html>, the OS's appearance, or the Theme Studio. It keeps the data and the zoom when it does.

The eight --elyra-chart-* tokens come in light and dark. They're checked for at least 3:1 contrast against --elyra-surface, the ratio WCAG requires for graphics, by tokens.test.js and in the Theme Studio. The order puts the most distinct colours first, so two series never look alike.

States

  • Loading: while live is loading with no value yet, a Skeleton of the chart's height.
  • Error: a Callout with the error, and Try again when the store can run again.
  • No points: Empty, with elyra.charts.empty ("No data").

What it says

  • The aria-label is a summary, as Sparkline's is:
    • for a line: "Revenue: from 120 to 260, between 120 and 260, over 4 months";
    • for a pie: the largest slices and their shares.
  • A visually hidden <table> has the data: categories as rows, series as columns, and each value in format. Screen readers can move through it. The assistant reads it as part of the window (RFC 0013), so "what was revenue in March?" is answered from the chart on screen.
  • onselect is also there from the keyboard. The chart is one tab stop, ←/→ move along the categories with the tooltip showing, and Enter selects.

The app's language

The words are under elyra.charts.* in framework/lang/en.json and nb.json: No data, Try again, the summary's phrases and the table's caption. Numbers and dates use Intl in the app's locale, unless a locale prop is given.

Testing

  • Each component's option for given props, as data: snapshots of the option object, not of pixels.
  • The tree-shaking: a build of an app that imports only PieChart contains no LineChart code. This is checked in CI against the built bundle.
  • The theme rebuilt on a data-theme change; no animation under reduced motion.
  • Live: a store's new value updates the option without a new ECharts instance; loading, error and empty show their states.
  • The hidden table and the summary, in English and Norwegian.
  • The --elyra-chart-* contrast in tokens.test.js.
  • A browser check of each chart in the docs, in light and dark.

Implementation plan

  1. The --elyra-chart-* tokens and their contrast test, in @elyra/ui.
  2. charts/: the shared base (theme, states, the hidden table, keys), then the six charts and Chart.
  3. elyra::charts::ChartData and its codegen.
  4. The tarball in the release scripts, rata new --charts, rata upgrade.
  5. The reference (docs/charts/*.md with examples, like @elyra/ui's), CHANGELOG.

Open questions

Answered in Decisions.

  1. A package of its own, or part of @elyra/ui? Recommendation: its own. ECharts is several hundred kB even tree-shaken, so an app without charts shouldn't install it. The roadmap asked for this too.
  2. SVG or canvas by default? Recommendation: SVG, because it's crisp at any scale, can be selected in the inspector, and is cheap for the hundreds of points a desktop app usually draws. renderer="canvas" is for the many thousands.
  3. Which charts first? Recommendation: WireCharts' free six (line, area, column, bar, pie and scatter), and Chart with option for anything else ECharts draws. Heatmap, gauge, funnel and radar come later, if apps ask for them.
  4. ChartData in the framework, or only a TypeScript type? Recommendation: in the framework, as a small Rust type. A live command returns it, rata codegen types it, and a Laravel endpoint decodes into it, so all three agree on the shape.
  5. Should the assistant read the chart from the hidden table, or from data the chart registers with the runtime? Recommendation: the hidden table. One thing then serves both the screen reader and the assistant, and the assistant already reads the window.

Not in this RFC

  • WireCharts' Pro charts (3D, sankey, sunburst, …). Chart with option draws them, without a component of their own.
  • Exporting a chart as PNG or SVG. It's worth doing through the file dialog, but separately.
  • Zoom and brush on a time axis.
  • A Laravel helper that builds the series. The contract is plain arrays, which WireCharts' users write already.

Alternatives considered

  • Chart.js: smaller, but canvas only. It has less of what a business app draws (stacked percents, a time axis with gaps, donuts with labels), and WireCharts' options are ECharts', so the two would drift apart.
  • Hand-written SVG, as Sparkline is: right for a sparkline, but axes, ticks, tooltips and legends are most of what a chart library is.
  • Bundling ECharts whole, about 1 MB: simpler, but every app pays for every chart.

As built

  • charts/: the six charts and Chart are thin; internal/ChartBase.svelte holds the ECharts instance, the states, the summary, the table and the keys, and internal/options.js builds each option as plain data, which the tests read. echarts 6.1.0, exact.
  • The words go through @elyra/ui's useWords, which now takes another package's table; the app's locale through its useAppLocale.
  • The theme is read from the element's computed tokens and read again on a change to <html>'s data-theme, data-contrast, style or class, or the OS's appearance, contrast or motion.
  • New data is set with replaceMerge: ["series"], so a removed series goes and the rest animate to their values.
  • The bundle test builds an app importing only PieChart with Vite and checks it holds series.pie and none of series.line, series.bar or series.scatter.
  • ChartData's Series::name is null when there's none: codegen can't type a field that's sometimes left out (skip_serializing_if), and the charts treat null as no name.
  • rata upgrade moves @elyra/charts' tarball with the others, and rata check's elyra-versions-differ holds it to the Rust side too.

Decisions

  1. A package of its own, @elyra/charts, a third tarball.
  2. SVG by default; renderer="canvas" for many thousands of points.
  3. WireCharts' free six first (line, area, column, bar, pie, scatter), and Chart with option for the rest.
  4. ChartData is a Rust type in the framework, so a live command, rata codegen and a Laravel endpoint agree on the shape.
  5. The assistant reads the hidden table, the same one the screen reader does.