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

feat(label): add limitInPlot label layout #3062

Merged
merged 2 commits into from
Dec 1, 2020
Merged

Conversation

lessmost
Copy link
Member

@lessmost lessmost commented Dec 1, 2020

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Description of change

limitInPlot 用来解决 label 和 坐标轴之类的组件出现的重叠遮挡问题:

before after
image image

配置方式:

view1.line().position('Year*Deaths').label('Deaths', {
      layout: [
        { type: 'limit-in-plot' },
        { type: 'path-adjust-position' },
        { type: 'limit-in-plot', cfg: { action: 'hide' } }
      ]
    });

@github-actions
Copy link

github-actions bot commented Dec 1, 2020

😭 Deploy PR Preview 18dec8c failed. Build logs

🤖 By surge-preview

@lessmost lessmost requested review from hustcc and visiky December 1, 2020 06:41
@coveralls
Copy link

coveralls commented Dec 1, 2020

Pull Request Test Coverage Report for Build 393282474

  • 46 of 48 (95.83%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 93.35%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/geometry/label/layout/limit-in-plot.ts 35 37 94.59%
Totals Coverage Status
Change from base Build 391575205: 0.01%
Covered Lines: 10611
Relevant Lines: 11023

💛 - Coveralls

@visiky visiky merged commit 8cdf428 into master Dec 1, 2020
@visiky visiky deleted the feat-limit-in-plot branch December 1, 2020 07:22
@coveralls
Copy link

coveralls commented Sep 2, 2024

Pull Request Test Coverage Report for Build 393241276

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 46 of 48 (95.83%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.01%) to 93.35%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/geometry/label/layout/limit-in-plot.ts 35 37 94.59%
Totals Coverage Status
Change from base Build 391575205: 0.01%
Covered Lines: 10611
Relevant Lines: 11023

💛 - Coveralls

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.

3 participants