-
Notifications
You must be signed in to change notification settings - Fork 175
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
Area plot not working on single point despite strokeLinecap: square #2163
Labels
documentation
Improvements or additions to docs
Comments
The documentation here is wrong because it was copied from the line mark; an area has no fill by default so setting the strokeLinecap has no effect by default. You need to set a stroke if you want a single-point area to be visible. |
Thank you for your support and clarification @mbostock. I am looking forward to see the documentation updated. |
Fil
added
documentation
Improvements or additions to docs
and removed
bug
Something isn’t working
labels
Sep 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describing the bug
As the title implies either I didn't understand the docs for this use case or there is a bug:
Excerpt from the API docs on area marks:
Expected behavior
If my plot contains gaps which creates single points, I don't need to do anything else but define the mark option
strokeLinecap: 'square'
so that I still see an area rendered at this data point.Steps how to reproduce
Here is my minimal working example in an Observable notebook
This is what it looks like at this point in time:
Only after adding styles to the area (SVG <path> Element) do I see the area for a single point. Is this the desired method?
The text was updated successfully, but these errors were encountered: