Skip to content

[Help] Creating a bar chart with one sided rounded rectangle #1201

Answered by mbostock
dennismphil asked this question in Q&A
Discussion options

You must be logged in to vote

Here is my suggestion using the rx option, and then “faking it” by using a negative insetBottom and clip.

Plot.rectY(data, {x: "Date", y: "Count", interval: d3.utcDay, rx: 6, insetBottom: -3, clip: "frame"})

https://observablehq.com/d/022b0876b936b4cb

Edit (July 2024): This is now supported in Plot as of #2099.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dennismphil
Comment options

@Kiss-World
Comment options

Answer selected by dennismphil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1200 on December 30, 2022 19:26.