-
Notifications
You must be signed in to change notification settings - Fork 199
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: 新增透视表 - 树状模式下的连接线示例 #3072
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
你好 @gb853940223,非常感谢你的贡献. 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. |
Walkthrough此PR新增了一个图表示例,展示了在透视表的树状模式下绘制Polyline以增加层次感。此功能类似于Antd中的TreeSelect,旨在通过在树形图中添加Polyline来增强视觉层次。 Changes
|
|
||
|
||
|
||
fetch( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fetch request to an external URL ('https://gw.alipayobjects.com/os/bmw-prod/2a5dbbc8-d0a7-4d02-b7c9-34f6ca63cff6.json') could lead to potential security risks, such as exposing the application to external dependencies and data breaches. Consider validating the data or ensuring the URL is trusted.
{ | ||
"filename": "pivot-chart-polyline.ts", | ||
"title": { | ||
"zh": "透视组合图 - PolyLine", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个和透视组合图应该没啥关系吧
建议就叫 "树状模式连接线" ? "PolyLine" 是连接线对应的实现方式, 对用户来说不太友好
/** | ||
* 销毁已存在的虚线 | ||
*/ | ||
function destroyDottedLines(lines: Polyline[] = []) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文件的缩进看起来有点奇怪, 是 GitHub 展示有问题?
s2.on(S2Event.LAYOUT_AFTER_RENDER, () => { | ||
drawDottedLines(s2); | ||
}) | ||
s2.on(S2Event.GLOBAL_SCROLL, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加一下销毁的处理? S2Event.LAYOUT_DESTROY
@@ -59,6 +57,15 @@ | |||
}, | |||
"screenshot": "https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*V-TMTaDYzxcAAAAAAAAAAAAADmJ7AQ/original", | |||
"new": true | |||
}, | |||
{ | |||
"filename": "pivot-chart-polyline.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pivot-tree-line.ts
稍后我再提交一个PR |
文档类的 commit 请以 "docs: xxx" 开头 |
👀 PR includes
✨ Feature
🎨 Enhance
🐛 Bugfix
🔧 Chore
📝 Description
新增一个图表示例,透视表 - 树状模式下绘制Polyline,以增加层次感。因为这种树形图,普遍都有Polyline,比如Antd中的TreeSelect。
🖼️ Screenshot
改动前:
改动后:
🔗 Related issue link
🔍 Self-Check before the merge