feat:update venn layout algorithm#239
Merged
xiaoluoHe merged 11 commits intoVisActor:mainfrom Jun 27, 2025
Merged
Conversation
xile611
reviewed
May 16, 2025
Contributor
Author
|
已经按照意见改掉了 |
Contributor
Author
xiaoluoHe
reviewed
May 27, 2025
| orientation = Math.PI / 2, | ||
| orientationOrder = null | ||
| orientationOrder = null, | ||
| emptySetKey = '' |
Contributor
Author
There was a problem hiding this comment.
按照xile的意见改的,可能我的实现对于这个配置项没什么效果
xiaoluoHe
reviewed
May 27, 2025
20 tasks
xile611
reviewed
May 29, 2025
xiaoluoHe
approved these changes
Jun 25, 2025
xiaoluoHe
reviewed
Jun 25, 2025
| ...area, | ||
| datum: area, | ||
| sets, | ||
| key: 'others', |
Contributor
There was a problem hiding this comment.
emptySetKey 应该用在这里吧;
key 默认可以给个 others,但是options 里如果配置了 emptySetKey,应该返回 emptySetKey
xiaoluoHe
reviewed
Jun 25, 2025
| { | ||
| "changes": [ | ||
| { | ||
| "comment": "fix: add emptySetKey option to IVennTransformOptions", |
Contributor
There was a problem hiding this comment.
vlayout 的 changelog 内容和 vutils 区分一下
xiaoluoHe
approved these changes
Jun 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


🤔 这个分支是...
🔗 相关 issue 连接
#238
💡 问题的背景&解决方案
📝 Changelog
Venn 图处理增强:
更新了 transform 函数,使其能够处理 sets 字段为空的情况,通过返回具有计算半径和中心的默认圆形来确保空集在 Venn 图中能正确表示
修改了 computeTextCenters 函数,使其能处理包含空集的区域,为这些区域分配默认中心点 (0, 0)
实用函数改进:
增强了 intersectionArea 函数,使其能处理输入 circles 数组为空的情况,通过在 stats 对象中设置默认值并返回面积为 0
测试覆盖:
添加了新的测试用例"具有空集的 3 元素 Venn 图的数据转换",以验证 Venn 图转换中空集的正确处理
元数据更新:
添加了变更文件,记录了 @visactor/vlayouts 和 @visactor/vutils 版本 1.0.5 的发布
☑️ 自测
🚀 Summary
更新transform算法,使得sets为空时返回一个表示含有剩余值的底层大圆。同时,在label.ts和circle-intersection.ts 中增加对边界状况的处理
🔍 Walkthrough
copilot:walkthrough