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(shape): conditionally render Arc without data #937

Merged
merged 2 commits into from
Nov 20, 2020
Merged

Conversation

williaster
Copy link
Collaborator

@williaster williaster commented Nov 18, 2020

🐛 Bug Fix

This supersedes #892 and partially addresses #886, it

  • conditionally renders @visx/shapes Arc when no data is specified if angles + radii are specified
  • adds a warning if we render null due to missing data + angles + radii for better dev experience

As mentioned in both issues above, d3-shape supports two types of usage for arc(), it can be configured with constant angles + radii, or passed them (as data in @visx/shape):

const arc1 = d3.arc();
arc1({ innerRadius, ... }); // "M0,-100A100,100,0,0,1,100,0L0,0Z"

const arc2 = d3.arc().innerRadius(...)...;
arc2(); // "M0,-100A100,100,0,0,1,100,0L0,0Z"

@hshoff @kristw
cc @oscar-broman @thecodeah

@coveralls
Copy link

Pull Request Test Coverage Report for Build 371119529

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 60.879%

Totals Coverage Status
Change from base Build 368243629: 0.07%
Covered Lines: 1632
Relevant Lines: 2535

💛 - Coveralls

@@ -12116,7 +12116,7 @@ reserved-words@^0.1.2:
resolved "https://registry.yarnpkg.com/reserved-words/-/reserved-words-0.1.2.tgz#00a0940f98cd501aeaaac316411d9adc52b31ab1"
integrity sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=

[email protected]:
[email protected], resize-observer-polyfill@^1.5.1:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

got a fresh laptop and this was changed

@williaster williaster merged commit 9f79dcd into master Nov 20, 2020
@williaster williaster deleted the chris--arc-data branch November 20, 2020 18:59
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