Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

No HTML or foreignObject scene node: per-datum icons and badges cannot live inside the plot

Aperta
#200 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript

Direzione di ricerca

Start with the SceneNode definitions in packages/charts-core/src/types.ts and the renderSvg implementation mentioned in the issue. Trace how scene nodes are rendered and how layout, clipping, and enter/exit motion are handled. Done means choosing and documenting a supported way to render per-datum HTML or foreignObject content with the described layout and motion behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A chart that needs a per-datum icon, badge or other HTML inside the plot has no scene node for it.

  • SceneNode is group | rule | polyline | area | dot | rect | label (types.ts:1599-1606). None embeds HTML or foreign content, and foreignObject is not emitted anywhere in charts-core.
  • SceneLabel carries a plain text: string (types.ts:1582-1586).
  • The only HTML slots are the tooltip body and the tooltip portal extension (types.ts:1666). Neither follows the scene's layout, clipping or enter/exit motion.

Use case: marker discs on a time-series chart, each holding a caller-supplied icon (an SVG or React element), sized to fill the disc or inset from it. Today the icon can only be drawn as label text, so element icons cannot be shown.

Repro

Nothing to run; this is an absence. A mark that emits a SceneNode with kind: 'html' (or any non-listed kind) is not part of the type, and renderSvg has no branch for it.

Proposal

Either:

  1. A scene node that hosts HTML or foreignObject content (position, size, a child), rendered by the SVG renderer and skipped or rasterised by canvas; or
  2. a documented custom-renderer slot for per-datum HTML that receives the resolved layout and takes part in enter and exit motion.

Checked against 57774e14a1a86081eddb3a23523724a40da05640 (v1.1.0).

Lingua principale
TypeScript
Stelle
819
Fork
49
Merge medio
12h 9m
PR unite (30g)
6

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TanStack/charts

Tutte le issue di TanStack/charts

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.