Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#200 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
react, typescript

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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).

Lenguaje dominante
TypeScript
Estrellas
819
Forks
49
Merge medio
12 h 9 min
PR fusionados (30 d)
6

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TanStack/charts

Todos los issues de TanStack/charts

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.