☰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

Bar(numbers, color="blue")

Community Support
jadoul.michel
jadoul.michel

Hello

This code shows a simple bar chart:

from bokeh.charts import *

co = [1,2,3,4,5,6,7,6,5,4,3,2,1]

p = Bar(co, legend=None)

show(p)

I would like to change the colors of the bars from pale red to blue in this way:

p = Bar(co, legend=None**, color=“blue”**))

This ends up with an error:

ValueError: cannot label index with a null key

Could you help me to put these bars in blue?

Could you also help me to understand why this line causes an error,

while the sample given on Bokeh Docs doesn’t:

bar-color sample on Bokeh Docs

Thanks,

Michel

⌁   Link to post

End of archived discussion · Replies are disabled