☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

VBar Shift "Anchor"

Community Supportvbarbokeh
Gen
Gen

I want to shift vbars over a categorical x-axis…I’ve checked the documentation but can’t find anything, so hopefully the community can help me out.

I have a simple example:

source = ColumnDataSource(data=dict(
    x=['First', 'Second'],
    y=[10,5],
    align=['center', 'left']
))

I want to use this CDS to make two vbars.
I want the first vbar to align directly over the categorical x (“First”). This is the default way it’s rendered.
But I want the second vbar to align to the left, so instead of being directly over the categorical x, it’s to the left.
For text glyphs, there is the ‘anchor’ value we can adjust to physically shift a subset of the glyphs, but is there something for bars?

I was picturing something like the below:
p.vbar(x='x', bottom=0, top='y', align='align',source=source)

⌁   Link to post

End of archived discussion · Replies are disabled