Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 新增透视表 - 树状模式下的连接线示例 #3074

Merged
merged 2 commits into from
Jan 10, 2025

Conversation

gb853940223
Copy link
Contributor

👀 PR includes

✨ Feature

  • New feature

🎨 Enhance

  • Code style optimization
  • Refactoring
  • Change the UI
  • Improve the performance
  • Type optimization

🐛 Bugfix

  • Solve the issue and close #0

🔧 Chore

  • Test case
  • Docs / demos update
  • CI / workflow
  • Release version
  • Other ()

📝 Description

新增一个图表示例,透视表 - 树状模式下绘制Polyline,以增加层次感。因为这种树形图,普遍都有Polyline,比如Antd中的TreeSelect。

🖼️ Screenshot

Before After

改动前:
image
image

改动后:
image
image

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

@github-actions github-actions bot added the next 2.0-next 版本的问题 label Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

你好 @gb853940223,非常感谢你的贡献.
为了让代码更健壮, 请根据 贡献指南 补充相应单元测试 (文档改动或其他特殊场景除外), 如果有 API 改动, 请修改 相应的文档.
同时请检查 linttest 相关 CI 是否通过, 如果失败, 请点击 [Details] 按钮查看, 并根据日志修复.

Hello, @gb853940223, Thanks for your contribution. In order to make the code more robust, please add the corresponding unit tests, and update the docs if there are API changes.
At the same time, please check whether the CI related to lint and test passes. If the CI fails, please click [Details] button to check and repair according to the log.

@github-actions github-actions bot added the pr(documentation) documentation label Jan 8, 2025
Copy link

Walkthrough

此PR新增了一个透视表的图表示例,展示了在树状模式下如何绘制Polyline以增强层次感。此功能类似于Antd中的TreeSelect,旨在通过连接线的方式提升树形图的视觉表现。

Changes

文件 概要
s2-site/examples/custom/custom-shape-and-chart/demo/meta.json 更新了图表示例的元数据。
s2-site/examples/custom/custom-shape-and-chart/demo/pivot-tree-line.ts 新增了用于绘制树状连接线的逻辑,包括销毁已绘制线条的功能,以及获取节点和视口信息的辅助函数。




fetch(

Choose a reason for hiding this comment

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

The use of fetch here without error handling could lead to unhandled promise rejections if the network request fails. Consider adding a .catch() block to handle potential errors gracefully.

@lijinke666 lijinke666 merged commit 158b423 into antvis:next Jan 10, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(documentation) documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants