[Feature] Scene: an HTML / `foreignObject` node for per-datum icons and badges
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- react, typescript
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
A chart that needs a per-datum icon, badge or other HTML inside the plot has no scene node for it.
SceneNodeisgroup | rule | polyline | area | dot | rect | label(types.ts:1599-1606). None embeds HTML or foreign content, andforeignObjectis not emitted anywhere incharts-core.SceneLabelcarries a plaintext: string(types.ts:1582-1586).- The only HTML slots are the tooltip body and the tooltip
portalextension (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:
- A scene node that hosts HTML or
foreignObjectcontent (position, size, a child), rendered by the SVG renderer and skipped or rasterised by canvas; or - 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).
- 主要语言
- TypeScript
- 星标
- 819
- 派生
- 49
- 平均合并
- 12 小时 9 分钟
- 30 天内合并 PR
- 6
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/charts 的其他 Issue
-
[Bug] Focus guides: `url(#id)` paints ignore `idPrefix`可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
brushX with `values` can shorten the selection range when it’s dragged to the plot edge可能已有人在做 @andersk 于 7 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 42/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 57/100
维护者通常 1 天内回复
相似的 Issue
-
e2e-failure ready-to-code
难度 2/5 1-3 小时 新手友好度 72/100
redhat-developer/rhdh-plugin-export-overlays#4391 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
Luligu/matterbridge#655 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
software-mansion/argent#1457 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
schmayterling/hibi#245 ·
维护者通常 1 天内回复
-
After a failed save, the red error banner stays on every page until the app is reloaded可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭ai-driven-qa bug claude Minor
难度 2/5 1-3 小时 新手友好度 70/100
linagora/twake-contacts-frontend#241 ·
维护者通常 1 天内回复