Replace metrics-graphics with Observable Plot
Les mainteneurs répondent en général sous 8 jours
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- d3, javascript
- Domaine
- data-visualization, frontend
Piste de recherche
Read docs/execplans/2026-11-05-observable-plot-charts.md first; it contains the plan and decision log for replacing metrics-graphics with @observablehq/plot. Then inspect Chart.test.jsx and the chart entry point to understand existing rendering and tests. Done means the charts retain the listed appearance and behavior, the three deliberate visitor-facing changes work, and the end-to-end tests still pass.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Line charts on data.firefox.com are drawn by metrics-graphics 2.15.6, which is abandoned. Its last stable release is from 2019.
Replace it with Observable Plot (@observablehq/plot), a maintained charting library from the d3 authors, built on d3 7.
Alternatives considered:
- Plain d3 modules. No new dependency, but we'd own all the hover, legend, and marker code ourselves.
- Chart.js. It draws to canvas, so every Playwright assertion on chart SVG would need rewriting.
- The metrics-graphics 3.0 beta. Unmaintained, and it breaks the 2.x API anyway.
Plot draws SVG like metrics-graphics does, so the end-to-end tests keep working on lines and strokes. It also renders in jsdom, so Chart.test.jsx can assert on the drawn chart instead of on an options object.
What changes for visitors
The charts should look the same: lines, colors and order (including generated colors past 11 populations), the legend, annotation markers, y-axis bounds and units, the shaded area on single-line charts, axis lines, and the hover readout. Three changes are deliberate:
- Charts no longer animate when they redraw.
- Clicking a chart pins the hover readout until the next click. This is built into Plot.
- A metric with no plottable data shows "No data to show for this metric." instead of "Load error".
What a prototype showed
- Resizing the hardware dashboard (#409) through five widths went from about 55 s to 0.56 s in Chromium, and from 67 s to 0.72 s in Firefox. That's most of #409's complaint, though the unthrottled resize listener is still there.
- The lazy chart chunk shrank from 492 kB to 265 kB (154 kB to 90 kB gzipped).
- d3 v4 and its nested
d3-transitionare gone, and thed3-coloradvisory with them.
The plan and its decision log are in docs/execplans/2026-11-05-observable-plot-charts.md on the branch for this work.
Related
- #409: hardware dashboard is slow to resize. Largely addressed by this change.
- #339: lines connect points across gaps in the data. Still happens after this change, but Plot makes it straightforward to fix (see the comment there).
- Langage dominant
- JavaScript
- Étoiles
- 21
- Forks
- 7
- Merge moyen
- 7 j 3 h
- PR mergées (30 j)
- 4
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de mozilla/ensemble
-
Fira Sans is still usedOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
Les mainteneurs répondent en général sous 8 jours
-
Do not show all data by defaultOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 64/100
Les mainteneurs répondent en général sous 8 jours
-
Add analytics.Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 52/100
Les mainteneurs répondent en général sous 8 jours
-
Make a deploy pipelineOuverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 10/100
Les mainteneurs répondent en général sous 8 jours
-
Update the Firefox logo in the faviconPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
Les mainteneurs répondent en général sous 8 jours
Toutes les issues de mozilla/ensemble
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
ImranR98/apps.obtainium.imranr.dev#2000 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
routing: the tray panel's stage stands still with motion reduced while a request is in flightOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
microsoft/monaco-editor#5577 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
obsidianmd/obsidian-help#1169 ·
Les mainteneurs répondent en général sous 2 jours
-
[docs] RELEASE.md: wrong branch name, no check that the prepare PR merged with the right subject, manual publish stepPeut-être pris @albertteoh l’a pris aujourd’hui. Ouvertedocumentation
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
jaegertracing/jaeger-ui#4739 ·
Les mainteneurs répondent en général sous 1 jour