☰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

Rainbow/Spectrum in Legend Box

Community Support
quasiben
quasiben

I am developing a barchat where the there are 3 items: A, B, and C. A is green, B is blue, and C can be any color. I want to display a legend on this plot with three boxes (standard for legends and barcharts) where the color corresponds to the item. However, for item C, is it possible to have the legend box color be a rainbow or spectrum ?

Note, this is different from a single spectrum for a legend

⌁   Link to post
jsignell
jsignell

I was toying around with a hack to try to make the rainbow emoji (:rainbow:) the glyph. I couldn’t quite get it to work, but I suspect that might be possible. Not sure if that is too goofy for your needs though :slight_smile:

⌁   Link to post
p-himik
p-himik

It’s possible, but it would require quite a lot of work, including creating a custom glyph that’s rendered as a rainbow.
Honestly, I would not bother with it at all and just make sure that the C legend item always has the same color as the C bar.

⌁   Link to post

End of archived discussion · Replies are disabled