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

fix: 修复在明细表中绘制 G2 图表, 点击单元格报错 close #2843 #2864

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

lijinke666
Copy link
Member

👀 PR includes

🐛 Bugfix

📝 Description

明细表普通单元格点击 tooltip 展示的是自身的数值, 对于自身是图表的场景不应该渲染 tooltip, 这里是错误的把图表数据渲染在 Tooltip 的 JSX 中, 所以报错了

image

🖼️ Screenshot

Before After

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

Copy link

vercel bot commented Aug 16, 2024

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

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Aug 16, 2024 6:05am

@github-actions github-actions bot added the next 2.0-next 版本的问题 label Aug 16, 2024
@github-actions github-actions bot requested review from wjgogogo and wuhaiyang August 16, 2024 06:05
@github-actions github-actions bot added the pr(fix) bug fix label Aug 16, 2024
@lijinke666 lijinke666 linked an issue Aug 16, 2024 that may be closed by this pull request
5 tasks
Copy link
Contributor

Size Change: +8 B (0%)

Total Size: 329 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 229 kB +8 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 388 B
./packages/s2-react/dist/index.min.js 70.8 kB
./packages/s2-react/dist/style.min.css 3.88 kB
./packages/s2-vue/dist/index.min.js 22.9 kB
./packages/s2-vue/dist/style.min.css 1.97 kB

compressed-size-action

@@ -584,7 +584,8 @@ export const getTooltipData = (params: TooltipDataParam): TooltipData => {
? spreadsheet.dataSet.getFieldName(value) || formattedValue
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该场景会兜底到 formattedValue, value 是 G2 的 Spec, 这种情况应该展示为空字符串

Copy link
Contributor

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

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

@github-actions github-actions bot added 🚨 test failed 单元测试挂了 and removed 🚨 test failed 单元测试挂了 labels Aug 16, 2024
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.79%. Comparing base (ecdc9c8) to head (0a6fe65).
Report is 423 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #2864      +/-   ##
==========================================
+ Coverage   75.77%   80.79%   +5.02%     
==========================================
  Files         257      180      -77     
  Lines       11994    10401    -1593     
  Branches     2464     2359     -105     
==========================================
- Hits         9088     8404     -684     
+ Misses       1398      554     -844     
+ Partials     1508     1443      -65     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lijinke666 lijinke666 merged commit 8684fb2 into next Aug 23, 2024
12 of 13 checks passed
@lijinke666 lijinke666 deleted the fix-2843 branch August 23, 2024 08:31
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v2.0.0-next.27 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(fix) bug fix released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🐛 G2 图表的单元格显示 tooltip 会抛出 Error
2 participants