Skip to content

Grouped chart with offset, but center if only one group #9452

Answered by kgoodrick-uu
jonchar asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Jon,

I think there are two ways to achieve this, one isn't quite a grouped bar chart but doesn't need manual bar sizes and the other is a grouped bar chart but requires manual sizing of the bar.

The first approach is to use a column encoding of an x encoding like this, which produces this chart:

For the second we can use a series of transforms to generate manual xOffsets like this, which produces this chart:

-Kyle

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jonchar
Comment options

Answer selected by jonchar
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