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

🐛透视表自定义列头分组 #2893

Closed
1 of 5 tasks
Ahui4518 opened this issue Sep 12, 2024 · 3 comments · Fixed by #2934
Closed
1 of 5 tasks

🐛透视表自定义列头分组 #2893

Ahui4518 opened this issue Sep 12, 2024 · 3 comments · Fixed by #2934
Assignees
Labels
🐛 bug 这个是一个 bug next 2.0-next 版本的问题

Comments

@Ahui4518
Copy link

🏷 Version

Package Version
@antv/s2 next
@antv/s2-react -
@antv/s2-vue -

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

在使用透视表的列头分组后,总计和小计的自动聚合计算不出来值

⌨️ Code Snapshots

在官网示例的透视表列头分组的options加入totals: {
row: {
showGrandTotals: true,
calcGrandTotals: {
aggregation: 'SUM'
}
}
}就可以复现

🔗 Reproduce Link

🤔 Steps to Reproduce

😊 Expected Behavior

使用自定义聚合时,回调的第二个参数应该返回小计或总计中需要计算的量值

😅 Current Behavior

透视表自定义列头后,自定义聚合回调的第二个参数为空数组

💻 System information

Environment Info
System -
Browser -
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Sep 12, 2024
@lijinke666 lijinke666 self-assigned this Sep 24, 2024
@lijinke666
Copy link
Member

lijinke666 commented Oct 23, 2024

自定义行/列头的场景, 内部实现比较特殊, 未适配总计/小计, 后续增强

Copy link
Contributor

你好 @Ahui4518,很抱歉给你带来了不好的体验, 我们会尽快排查问题并修复, 请关注后续发布日志.

Hello, @Ahui4518, We are so sorry for the bad experience. We will troubleshoot and fix the problem as soon as possible. Please pay attention to the follow-up change logs.

@lijinke666
Copy link
Member

已适配, 本周发布

image

lijinke666 added a commit that referenced this issue Oct 28, 2024
…2893 (#2934)

* fix: 开启自定义行列头时, 不应该渲染总计节点和组内排序 icon closes #2898 #2893

* docs: 优化文档

* test: 更新单测

* fix: 明细表非叶子节点不渲染 sort icon

* test: 修复单测

* fix: 兼容自定义布局时 dataset 层对象类型 field 的定位处理

* fix: lint fix

* refactor: 移除 todo 代码

* feat: 增加自定义行列头对总计小计的支持

* docs: 文档更新

* refactor: 移除 CustomTreeDataSet

* test: 增加单测

* test: 单测修复

* test: 单测修复

* refactor: 去除注释

* refactor: 还原 custom-tree 单测

---------

Co-authored-by: wjgogogo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug 这个是一个 bug next 2.0-next 版本的问题
Projects
None yet
2 participants