Skip to content

feat: 支持配置前端计算小计/总计#921

Merged
xingwanying merged 17 commits intomasterfrom
feat-surport-caculate-totals
Jan 24, 2022
Merged

feat: 支持配置前端计算小计/总计#921
xingwanying merged 17 commits intomasterfrom
feat-surport-caculate-totals

Conversation

@yangzhanmei
Copy link
Copy Markdown
Contributor

@yangzhanmei yangzhanmei commented Dec 20, 2021

👀 PR includes

✨ Feature

  • New feature

📝 Description

支持配置前端计算小计/总计

🖼️ Screenshot

Before After

🔗 Related issue link

close #537

🔍 Self Check before Merge

  • Add or update relevant Docs.
  • Add or update relevant Demos.
  • Add or update relevant TypeScript definitions.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 20, 2021

🎊 PR Preview has been successfully built and deployed to https://s2-preview-pr-921.surge.sh

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 20, 2021

Size Change: +733 B (0%)

Total Size: 189 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 118 kB +360 B (0%)
./packages/s2-react/dist/index.min.js 67.9 kB +373 B (+1%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 356 B
./packages/s2-react/dist/style.min.css 3.1 kB

compressed-size-action

@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Dec 20, 2021

This pull request fixes 1 alert when merging 7991b49 into d6ebc3d - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 20, 2021

你好, @yangzhanmei CI 执行失败, 请点击 [Details] 按钮查看, 并根据日志修复。

Hello, @yangzhanmei CI run failed, please click the [Details] button for detailed log information and fix it.

@github-actions github-actions bot added the 🚨 test failed 单元测试挂了 label Dec 20, 2021
@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Dec 20, 2021

This pull request fixes 1 alert when merging 9fe0742 into d6ebc3d - view on LGTM.com

fixed alerts:

  • 1 for Unused variable, import, function or class

@codecov
Copy link
Copy Markdown

codecov bot commented Dec 20, 2021

Codecov Report

Merging #921 (e128739) into master (f7ba78f) will increase coverage by 0.03%.
The diff coverage is 51.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #921      +/-   ##
==========================================
+ Coverage   71.88%   71.92%   +0.03%     
==========================================
  Files         170      171       +1     
  Lines       12243    12306      +63     
  Branches     2884     2907      +23     
==========================================
+ Hits         8801     8851      +50     
- Misses       2244     2248       +4     
- Partials     1198     1207       +9     
Impacted Files Coverage Δ
packages/s2-core/src/utils/tooltip.ts 48.31% <ø> (+2.18%) ⬆️
packages/s2-core/src/utils/data-set-operate.ts 70.88% <22.22%> (-6.04%) ⬇️
packages/s2-core/src/utils/number-calculate.ts 60.00% <44.44%> (ø)
packages/s2-core/src/data-set/pivot-data-set.ts 69.66% <63.88%> (-0.04%) ⬇️
...ckages/s2-core/src/utils/dataset/pivot-data-set.ts 78.78% <0.00%> (-1.02%) ⬇️
packages/s2-core/src/facet/base-facet.ts 73.37% <0.00%> (+0.39%) ⬆️
packages/s2-core/src/cell/header-cell.ts 51.94% <0.00%> (+0.48%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f7ba78f...e128739. Read the comment docs.

@github-actions github-actions bot removed the 🚨 test failed 单元测试挂了 label Dec 20, 2021
@xingwanying
Copy link
Copy Markdown
Member

补充下对应文档?

@lijinke666 lijinke666 added the 🙏 need test cases or docs 需要单元测试或者补充文档 label Dec 21, 2021
@github-actions
Copy link
Copy Markdown
Contributor

你好 @yangzhanmei,感谢你的贡献, 为了让代码更健壮, 请补充相应单元测试, 如果有API改动, 请修改 相应的文档

Hello, @yangzhanmei, 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.

@github-actions github-actions bot added the 🚨 test failed 单元测试挂了 label Dec 30, 2021
@github-actions github-actions bot removed the 🚨 test failed 单元测试挂了 label Dec 30, 2021
@yangzhanmei yangzhanmei removed the 🙏 need test cases or docs 需要单元测试或者补充文档 label Dec 31, 2021
@github-actions github-actions bot added the 🚨 test failed 单元测试挂了 label Dec 31, 2021
@Cuiyansong
Copy link
Copy Markdown
Contributor

Cuiyansong commented Jan 5, 2022

请问,当前这个PR是官方发布的版本,还是社区支持?是否有前端计算总计和小记的PRD。目前,我们也实现了一套简单的总计功能。

@xingwanying xing @yangzhanmei yan

@xingwanying
Copy link
Copy Markdown
Member

请问,当前这个PR是官方发布的版本,还是社区支持?是否有前端计算总计和小记的PRD。目前,我们也实现了一套简单的总计功能。

@xingwanying xing @yangzhanmei yan

目前还在孵化阶段,欢迎给我们提pr 0,0

@github-actions github-actions bot removed the 🚨 test failed 单元测试挂了 label Jan 20, 2022
@xingwanying xingwanying reopened this Jan 24, 2022
@xingwanying xingwanying merged commit 999cfc1 into master Jan 24, 2022
@xingwanying xingwanying deleted the feat-surport-caculate-totals branch January 24, 2022 03:59
YardWill added a commit that referenced this pull request Jan 24, 2022
* chore: 🤖 auto sync site s2 lock and changelog [skip ci] (#1004)

* chore(release): 🔖@antv/[email protected]  @antv/[email protected]

* chore(release): 🔖 @antv/[email protected]  @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.3.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.3.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.4.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.4.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.5.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.5.0 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected] (#1003)

* chore(release): 🤖 @antv/s2-v1.6.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.6.0 [skip ci]

* chore: 🤖 auto sync site s2 lock and changelog [skip ci]

Co-authored-by: yingying.xwy <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: xinhui.zxh <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Update base-facet.ts (#1009)

手机端滑动问题修改

* docs: 修复文档404链接和报错demo (#1025)

* chore(ci): 新增 prerelease 推送 & CI 细节调整 (#1027)

* chore(ci): 新增 prerelease 推送 & ci 细节调整

* chore(ci): 去掉 --ignore-scripts

* chore(ci): 去掉 --ignore-scripts

* fix(facet): scroll speed options & pagination totals (#1031)

* fix: scrollSpeedRatio value

* fix: ts err

* fix: revert change

* fix: pagination total

* fix(s2-core): 修复延迟销毁表格时没有移除canvas节点的问题 close #1011 (#1033)

* docs: 增加小册子demo《哲学家的观点》 (#1035)

* fix(tooltip): 修复单元格文字过长时 tooltip 显示被截断 close #1028 (#1034)

* feat: 支持配置前端计算小计/总计 (#921)

* feat: surport caculate totals in pivot data set

* test: add number calculate and totals calculate test

* refactor: change totals type to readonly

* refactor: code style

* refactor: code style and optimize test

* docs: add calcTotals's docs and demos

* fix: get cell data

* test: table facet test's width

* feat: 重构前端计算汇总值

* test: 增加前端计算totals测试

* refactor: 抽离getAggregationAndCalcFuncByQuery到utils

* test: 增加getAggregationAndCalcFuncByQuery的测试

* docs: 小计总计文档更新

* fix(tooltip): 修复明细表列头的 tooltip 内容被错误的格式化 close #998 (#1036)

* fix(tooltip): 修复明细表列头的 tooltip 内容被错误的格式化 close #998

* chore: 还原 meta

* test: 修复测试

* fix(interactive): table move problem (#1013)

* fix: table move problem

* fix: code

* fix: v

* fix: move

* fix: calculateInViewIndexes

* feat: update table facet

* fix: v

* fix: code 整理

* fix: 修复测试用例

Co-authored-by: xinhui.zxh <[email protected]>

* docs: 优化demo《哲学家的观点》 (#1038)

* feat: 完善交叉表分页功能 (#1037)

* chore: s2-react watch script

* fix: maxHeight等于offset数组值时下标返回偏大

* fix(s2react): 交叉表初始化未更新分页total

* fix(facet): 序号列无法渲染

* fix(pivotfacet): 渲染行数返回错误

* fix(facet): 按视窗高度剪裁行头和序号列

* fix: 计算文字位置时应使用viewportHeight视窗高度

* fix(facet): rowIndexHeader可能为null

* fix(facet): 序号列应早于列头添加到group (#1040)

* chore(release): @antv/[email protected] @antv/[email protected] (#1039)

* chore(release): @antv/[email protected] @antv/[email protected] (#1039) (#1041)

This reverts commit 0d538f2.

* chore(release): @antv/[email protected] @antv/[email protected]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yingying.xwy <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: xinhui.zxh <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: gehaiyi <[email protected]>
Co-authored-by: Jinke Li <[email protected]>
Co-authored-by: yangzhanmei <[email protected]>
Co-authored-by: 刘嘉一 <[email protected]>
@lijinke666
Copy link
Copy Markdown
Member

🎉 This PR is included in version @antv/s2-v1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Copy Markdown
Member

🎉 This PR is included in version @antv/s2-v1.7.0-alpha.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

wjgogogo pushed a commit that referenced this pull request Oct 25, 2023
* feat: surport caculate totals in pivot data set

* test: add number calculate and totals calculate test

* refactor: change totals type to readonly

* refactor: code style

* refactor: code style and optimize test

* docs: add calcTotals's docs and demos

* fix: get cell data

* test: table facet test's width

* feat: 重构前端计算汇总值

* test: 增加前端计算totals测试

* refactor: 抽离getAggregationAndCalcFuncByQuery到utils

* test: 增加getAggregationAndCalcFuncByQuery的测试

* docs: 小计总计文档更新
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🙏支持配置前端计算小计/总计

5 participants