antvis / S2

⚡️ A practical visualization library for tabular analysis.
https://s2.antv.antgroup.com
MIT License
1.48k stars 195 forks source link

feat: 统一透视表和明细表 meta 中的 query 参数 #2818

Closed lijinke666 closed 3 months ago

lijinke666 commented 3 months ago

👀 PR includes

🎨 Enhance

📝 Description

  1. 透视表和明细表的数值单元格元数据格式统一,现在 cellMeta 中都包含 query/rowQuery/colQuery. 避免造成用户困扰 (eg https://github.com/antvis/S2/issues/2816), 透视表用 query, 明细表用 rowIndex, 统一查询都用 query 的心智.

image

透视表:

{
  rowQuery: {
    "province": "浙江省",
    "city": "宁波市"
  },
  colQuery: {
    "sub_type": "沙发",
    "type": "家具",
    "$$extra$$": "number"
  },
+ query: {
+   "province": "浙江省",
+   "city": "宁波市",
+   "sub_type": "沙发",
+   "type": "家具",
+   "$$extra$$": "number"
+  }
}

明细表:

{
+  rowQuery: {
+    "rowIndex": 1,
+  },
+  colQuery: {
+    "colIndex": 2,
+  },
+  query: {
+    "rowIndex": 1,
+    "colIndex": 2
+  }
}
  1. 订正一些错误的类型和文档.

🖼️ Screenshot

Before After

🔗 Related issue link

🔍 Self-Check before the merge

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Jul 15, 2024 9:05am
github-actions[bot] commented 3 months ago

Size Change: +70 B (+0.02%)

Total Size: 326 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 228 kB +70 B (+0.03%)
ℹ️ View Unchanged | Filename | Size | | :--- | :---: | | `./packages/s2-core/dist/style.min.css` | 388 B | | `./packages/s2-react/dist/index.min.js` | 69.9 kB | | `./packages/s2-react/dist/style.min.css` | 3.88 kB | | `./packages/s2-vue/dist/index.min.js` | 22 kB | | `./packages/s2-vue/dist/style.min.css` | 1.97 kB |

compressed-size-action

github-actions[bot] commented 3 months ago

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

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

codecov-commenter commented 3 months ago

Codecov Report

Attention: Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 80.57%. Comparing base (ecdc9c8) to head (84cb88b). Report is 409 commits behind head on next.

Files Patch % Lines
packages/s2-core/src/facet/table-facet.ts 66.66% 1 Missing and 1 partial :warning:
...kages/s2-core/src/interaction/row-column-resize.ts 0.00% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## next #2818 +/- ## ========================================== + Coverage 75.77% 80.57% +4.80% ========================================== Files 257 180 -77 Lines 11994 10344 -1650 Branches 2464 2342 -122 ========================================== - Hits 9088 8335 -753 + Misses 1398 564 -834 + Partials 1508 1445 -63 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lijinke666 commented 2 months ago

:tada: This PR is included in version @antv/s2-v2.0.0-next.26 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

lijinke666 commented 2 months ago

:tada: This PR is included in version @antv/s2-react-v2.0.0-next.25 :tada:

The release is available on:

Your semantic-release bot :package::rocket: