Skip to content

keep non-zero rects visible #422

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

Closed
wants to merge 1 commit into from
Closed

keep non-zero rects visible #422

wants to merge 1 commit into from

Conversation

Fil
Copy link
Contributor

@Fil Fil commented May 29, 2021

When drawing a rect with an inset leave a sliver of matter (here 0.1px), unless the original width or height is 0.

See discussion in #417

…px), unless the original width or height is 0.

See discussion in #417
@Fil Fil requested review from mbostock and mkfreeman May 29, 2021 16:18
@mbostock
Copy link
Member

I’d like to avoid this special case for now. If we were to keep this, here’s what I’d think about:

  • Should there be a hard limit (of 0.1? of 0.5?), or should there be a gradual taper as the insets are larger than the desired width of the mark?
  • When the full inset cannot be applied, should the effective insets be reduced equally from both sides, rather than just one side?
  • Should this technique apply to other marks too, at the least bars?

The default bin cap #421 was a cleaner solution for the motivating example here, though I fully recognize that there are other cases where rects can disappear. (We addressed another special case for collapsed domains in #470.) I’d rather keep it simple for now and revisit if this problem crops up again in other forms.

@mbostock mbostock closed this Aug 10, 2021
@Fil Fil mentioned this pull request Sep 24, 2021
@Fil Fil deleted the fil/no-negative-width branch January 24, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants