Skip to content

ruleX in between 2 bar chart categorical points #855

Answered by enjalot
rht asked this question in Q&A
Discussion options

You must be logged in to vote

This may not be the best answer, but a quick fix I thought of would be to use tickX instead and use an offset:
https://observablehq.com/d/a642afc2bb1d73b1

So the data for the tick is the category to the left of the divide you want to make. then you shift it to the right by some number of pixels to place it.
Plot.tickX(["Comedy"], { strokeDasharray: "4 2", dx: 11})

The "real" solution to this might be to make two plots, one for each side and place them together in html. You'd probably want to set the y scale domain to be the same.

Replies: 1 comment 2 replies

Comment options

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

@rht
Comment options

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

This discussion was converted from issue #854 on April 25, 2022 14:45.