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

🐛当多度量且在维度前面时,合计或小计统计无效 #2776

Open
1 of 5 tasks
xuanxiaoxiao opened this issue Jun 17, 2024 · 1 comment
Open
1 of 5 tasks
Assignees
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复

Comments

@xuanxiaoxiao
Copy link

xuanxiaoxiao commented Jun 17, 2024

🏷 Version

官方示例,不论是1.x的版本还是2.0内测版,均有此问题

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

首先打开官方示例,这里附最新地址
具体位置在【分析能力-小计总计-多度量值】(其实什么示例都可以,只是这个示例改动最少代码即可复现)
核心是在 s2DataConfig 中增加 customValueOrder: 0 的配置

让度量在行且在维度前面,如图:
image
让度量在列且在维度前面,如图:
image

其它情况均正常,只要不设置customValueOrder=0,合计都没问题;如果设置了customValueOrder=0,但只要是单度量也没有问题,下面简单列举两个场景
当度量在行且在维度后面时,无此问题,如图:
image
当度量减少到1个的时候,也无此问题,如图:
image

⌨️ Code Snapshots

  fields: {
    rows: ['province', 'city'],
    columns: ['type'],
    valueInCols:false, // 度量在行
    customValueOrder: 0, // 度量在维度前面
    values: ['price', 'cost'],
  },

🔗 Reproduce Link

详见:Description

🤔 Steps to Reproduce

详见:Description,复现很简单,只需要配置两个属性

😊 Expected Behavior

当多度量且度量在维度前时,能正确展示总计信息。可能这里需要设计总计位置,这个只需合理即可,你们可以自主决定。需要注意这里还有个valueInCols配置,两种情况均要能展示合计值

😅 Current Behavior

当多度量且度量在维度前时,不论度量是在列还是在行,总计的值均未统计出来

💻 System information

Environment Info
System window 11
Browser chrome: v125.0
@xuanxiaoxiao xuanxiaoxiao changed the title 🐛当指标在行且在维度前面时,合计或小计统计无效 🐛当度量在行且在维度前面时,合计或小计统计无效 Jun 17, 2024
@xuanxiaoxiao xuanxiaoxiao changed the title 🐛当度量在行且在维度前面时,合计或小计统计无效 🐛当多度量(>1)在行且在维度前面时,合计或小计统计无效 Jun 17, 2024
@xuanxiaoxiao xuanxiaoxiao changed the title 🐛当多度量(>1)在行且在维度前面时,合计或小计统计无效 🐛当多度量且在维度前面时,合计或小计统计无效 Jun 17, 2024
@xuanxiaoxiao
Copy link
Author

我在之前的issue里面找到了类似问题,你们回复的大意是这不算一个BUG,而是你们不支持多指标的customValueOrder配置,但我现在看到的,除了合计/小计之外,其他一切正常,实际渲染中customValueOrder配置确实生效了,哪怕是多指标。
所以问题回来,本质上是当多指标情况且设置了customValueOrder=0时,最外层的总计已经没有实际意义了(我们不能把多个指标的总计再做总计运算,这不合逻辑),只能下放到每个指标的小计内,这或许是一条思路

@lijinke666 lijinke666 self-assigned this Jun 21, 2024
@github-actions github-actions bot added the 💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复
Projects
None yet
Development

No branches or pull requests

2 participants