Skip to content
Discussion options

You must be logged in to vote

You can remove the gap by setting binSpacing to 0.

source = pd.DataFrame({
    'a': ['2025-01-01 00:01', '2025-01-01 00:02', '2025-01-01 00:03', '2025-01-01 00:04', '2025-01-01 00:05'],
    'b': [28, 55, 43, 91, 81]
})

alt.Chart(source, width=100).mark_bar(
    width=alt.RelativeBandSize(1),
    binSpacing=0
).encode(
    alt.X('hoursminutes(a)').axis(grid=False).scale(padding=0),
    alt.Y('b')
)

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@cstork
Comment options

@kgoodrick-uu
Comment options

@cstork
Comment options

@joelostblom
Comment options

@cstork
Comment options

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