Skip to content

docs: clarify sequence and extension chart version requirements - #4719

Merged
xile611 merged 4 commits into
developfrom
codex/sequence-demo-version-guard
Oct 20, 2026
Merged

xile611 merged 4 commits into
developfrom
codex/sequence-demo-version-guard

Conversation

@skie1997

@skie1997 skie1997 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

问题与修改

图表示例和教程没有明确版本要求,切换到旧版运行时会直接调用不存在的扩展注册方法。此 PR 补充 sequence、sequenceAnalysis 和 storyline 的版本说明,并沿用已有 K 线图、3D 图表示例的条件注册方式:使用 if (VChartExtension.registerXXX) { ... },方法存在时调用,不存在时跳过注册。

  • sequence:自 2.2.0 起迁入扩展包;旧版本完整包内置该图表。中英文 8 段 demo 对 registerSequenceChart 做存在性判断。
  • sequenceAnalysis:自 2.2.0 起支持。更新步骤、介质连线、目标头像 3 个示例的中英文版本。
  • storyline:自 2.1.7 起支持。更新 landscape、portrait、clock、arc、wing 5 个示例的中英文版本。
  • 两类扩展图表共 16 段 demo 使用条件注册,保留最低版本和配套扩展包的注释。条件判断不表示旧版本支持新图表,运行它们仍需满足文档中的最低版本要求。
  • 中英文教程、API 文档同步说明最低版本及两包版本一致要求,教程 CDN 注册示例采用同样的条件判断。Storyline CDN 示例固定为配套 2.1.7。
  • 图表 spec、渲染和独立滚动容器生命周期不变。

参考与版本依据

  • 既有写法:docs/assets/examples/zh/candlestick-chart/candlestick-basic.md、docs/assets/examples/zh/chart-3d/bar3d.md、docs/assets/examples/zh/chart-3d/wordcloud3d.md。
  • 已检查发布产物:2.1.6 未导出 storyline,2.1.7 已导出 registerStorylineChart;2.1.7 未导出 sequenceAnalysis,2.2.0 已导出 registerSequenceAnalysis。sequence 迁移版本与 v2.2.0 release notes 一致。

验证

  • 24 段完整 livedemo 均通过站点相同配置的 Buble 编译。
  • 28 段注册代码(含教程 CDN 示例)的 84 个场景通过:在文档演示环境提供 VChartExtension 全局变量的前提下,方法缺失或 undefined 时跳过注册;有效函数恰好调用一次,并核对 VChart 参数。
  • 16 段扩展 demo 的 spec、DOM 生命周期和渲染代码与原始版本一致。
  • 站点通过实际 build-documents 脚本重新生成文档;git diff --check 通过。
  • 按 AGENTS.md 使用 Node.js 22 尝试全量视觉测试(264 个用例),因隔离检出目录缺少 Rush/TypeScript 依赖,在 PREFLIGHT_FAILED: Cannot find module 'typescript' 处停止,全部用例未执行。上述编译和条件注册检查不等于真实画布渲染测试。

@github-actions github-actions Bot added the docs label Oct 20, 2026
@skie1997 skie1997 changed the title docs: clarify sequence versions and guard demo registration docs: clarify sequence and extension chart version requirements Oct 20, 2026

@visactor-review-bot visactor-review-bot Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最新复查提交: 33a26f3

未发现可确认的新问题;原有条件注册缺失时仍继续渲染的问题待解决:https://github.com/VisActor/VChart/pull/4719#discussion_r4322097995。

@VisActor VisActor deleted a comment from visactor-review-bot Bot Oct 20, 2026
@xile611
xile611 merged commit eb164e8 into develop Oct 20, 2026
11 of 13 checks passed
@xile611
xile611 deleted the codex/sequence-demo-version-guard branch October 20, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants