Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#200 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript

Research direction

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.

Written by the indexing model from the issue text.

Description

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

Dominant language
TypeScript
Stars
819
Forks
49
Avg merge
12h 9m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from TanStack/charts

All issues in TanStack/charts

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.