Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Feature] `motion()`: configurable enter start state (scale about the centre, arc seeds for partitions)

未关闭
#214 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 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)
Ask
  • Generic marks: an enter option on motion() (or on the mark's motion) with from: { opacity?, scale? } and origin: 'center' | 'start', applied per element with the existing per-datum delay. Or a documented per-element enter transform.
  • Partition marks: enter: { from(node) } and exit: { 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

TanStack/charts 的其他 Issue

查看 TanStack/charts 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。