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

Band scales shift the clip option #949

Closed
Fil opened this issue Jun 23, 2022 · 0 comments · Fixed by #950
Closed

Band scales shift the clip option #949

Fil opened this issue Jun 23, 2022 · 0 comments · Fixed by #950
Labels
bug Something isn’t working

Comments

@Fil
Copy link
Contributor

Fil commented Jun 23, 2022

As reported in https://talk.observablehq.com/t/plot-clip-flag-is-chopping-first-row-text/6730, having bars and the {clip: true} option results in improper clipping.

The reason is that when x (or y) is a band scale, the whole element is shifted by x.bandwidth()/2.

See https://observablehq.com/@observablehq/plot-band-clip-949 and a fix in #950

Fil added a commit that referenced this issue Jun 23, 2022
@mbostock mbostock added the bug Something isn’t working label Jun 23, 2022
@Fil Fil closed this as completed in #950 Jun 23, 2022
Fil added a commit that referenced this issue Jun 23, 2022
* clip supports band scales

closes #949

Co-authored-by: Mike Bostock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants