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

Chart with facets: ticks overflow #2025

Closed
Jerboas86 opened this issue Mar 20, 2024 · 5 comments
Closed

Chart with facets: ticks overflow #2025

Jerboas86 opened this issue Mar 20, 2024 · 5 comments

Comments

@Jerboas86
Copy link

In charts with facets:
If ticks property is defined without domain property, the axis will overflow.

Bug reproduction

(see observablehq)

Expected behavior

  • no overflow
  • domain is derived from ticks
@Fil
Copy link
Contributor

Fil commented Mar 20, 2024

can you share the notebook? 🙏

@Jerboas86
Copy link
Author

can you share the notebook? 🙏

Sorry for that, it should be public now

@Fil
Copy link
Contributor

Fil commented Mar 20, 2024

That's the expected behavior. If you want to derive the domain from the ticks, you can add a mark that will inject the ticks into the channels considered to build the domain. Or better yet, use the axisX mark with explicit ticks:

  Plot.axisX([125, 250, 500, 1000, 2000, 4000, 8000]),

and then you don't need to specify them again in the specification for the x scale.

@Fil Fil closed this as completed Mar 20, 2024
@Jerboas86
Copy link
Author

Jerboas86 commented Mar 20, 2024

the axis of Facet A goes over axis of facet B, how that can be the expected behavior ?

@Fil
Copy link
Contributor

Fil commented Mar 20, 2024

"Expected behavior" does not mean that it results in a great chart, only that it's what the code is expected to do.

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

No branches or pull requests

2 participants