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: 修复散点图 tooltip 默认 fields 丢失 #2019

Merged
merged 2 commits into from Nov 29, 2020

Conversation

lxfu1
Copy link
Member

@lxfu1 lxfu1 commented Nov 27, 2020

修改前
image

修改后
image

@github-actions
Copy link
Contributor

github-actions bot commented Nov 27, 2020

😭 Deploy PR Preview 68529bd failed. Build logs

🤖 By surge-preview

@coveralls
Copy link

coveralls commented Nov 27, 2020

Pull Request Test Coverage Report for Build 386412447

  • 6 of 7 (85.71%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.01%) to 96.705%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/plots/scatter/adaptor.ts 6 7 85.71%
Files with Coverage Reduction New Missed Lines %
src/plots/scatter/adaptor.ts 2 91.53%
Totals Coverage Status
Change from base Build 382637271: -0.01%
Covered Lines: 3970
Relevant Lines: 4005

💛 - Coveralls

@hustcc
Copy link
Member

hustcc commented Nov 27, 2020

求加对比前后的截图。参考 https://www.yuque.com/antv/g2plot/yux33f

if (tooltip && !tooltip.fields) {
tooltip = {
...tooltip,
fields: [xField, yField, colorField, sizeField, shapeField],
Copy link
Member

Choose a reason for hiding this comment

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

应该就是给 tooltip fields 加默认值。

If tooltip
tooltip = { fields: [xxx], ...tooltip }

@liuzhenying liuzhenying self-requested a review November 29, 2020 11:30
@liuzhenying liuzhenying merged commit 81885fe into master Nov 29, 2020
@liuzhenying liuzhenying deleted the fix/scatter-fields branch November 29, 2020 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants