[Feature] `motion()`: configurable enter start state (scale about the centre, arc seeds for partitions)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- typescript
调研方向
Read packages/charts-core/src/motion.ts around the enter-track and partition-seed logic, then compare the ChartMotionTiming types in packages/charts-core/src/types.ts and the sunburst lineage guidance in docs/reference/marks/sunburst.md. The issue proposes API changes for generic marks and partition marks; done means both can accept per-element enter or exit start states while retaining per-datum delays.
由索引模型根据 Issue 内容生成。
描述
Version: @tanstack/charts 1.1.0 (57774e1). Split from #193 (comment section D) and #194 (section C) so it can be closed on its own.
A mark cannot choose how its elements enter: generic marks only fade, and sunburst sectors only take their start shape from an ancestor. Both asks are the same API, an enter start state per element.
Generic marks: the only enter is an opacity fade (from #193 D)
When a keyed rect, dot or text gets an enter track, addEnterMotionTrack ends in a single opacity attribute tween from 0 to the target (motion.ts:2596-2635). ChartMotionTiming carries only delay, transition and path (types.ts:872-877), so a mark cannot ask for another shape of enter.
Example: radial gauge notches (areaX/rect marks) that should grow from scale 0 about each notch's own centre, with a per-notch delay. With the built-in tracks the only options are a fade or nothing. The workaround is scoped CSS keyframes keyed on data-ts-key, which depend on renderer-owned DOM and have to be aligned with the motion clock by hand.
Partition marks: enter/exit seeds cannot be supplied (from #194 C)
- Seeds come only from the nearest related ancestor (
motion.ts:2745,motion.ts:2770); with none, the sector only fades. - The docs describe lineage as the only source (
sunburst.md:171-174).
Ask
- Generic marks: an
enteroption onmotion()(or on the mark'smotion) withfrom: { opacity?, scale? }andorigin: 'center' | 'start', applied per element with the existing per-datumdelay. Or a documented per-element enter transform. - Partition marks:
enter: { from(node) }andexit: { to(node) }, returning[startAngle, endAngle, innerRadius, outerRadius].
Read from source, not run.
Related: #193 (missing enter tracks), #194 (arc motion).
- 主要语言
- TypeScript
- 星标
- 819
- 派生
- 49
- 平均合并
- 4 小时 58 分钟
- 30 天内合并 PR
- 15
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TanStack/charts 的其他 Issue
-
[Bug] Focus guides: `url(#id)` paints ignore `idPrefix`可能已有人在做 @getdownandcode 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
[Bug] Printed charts keep their screen width: resize redraw waits for an animation frame可能已有人在做 @piecyk 今天认领。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
维护者通常 1 天内回复
-
[Feature] Readable outside labels for crowded pie and donut charts可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 5/5 一周以上 新手友好度 25/100
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 42/100
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 57/100
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
vercel/streamdown#673 · 1 个 reaction ·
维护者通常 1 天内回复
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunk未关闭factory-active task-identify-harness-labels-done task-identify-issue-type-done
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
agilepathway/label-checker#721 ·
维护者通常 1 天内回复
-
CLI Empathy needs triage
难度 2/5 1-3 小时 新手友好度 74/100
chromaui/chromatic-cli#1524 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复