I’m trying to emulate the glyphs Google uses to display Popular times in Google Maps for another application.
Looking through the Bokeh documentation I see there are two attributes, line_cap, and line_join. First, I don’t know how to get the vbar element from a bar chart so I’ve been creating a vbar object from the plotting module.
The passing in line_cap=‘round’ doesn’t seem to have an effect for the vbar object, and the line_join will round both the top and the bottom of the bar glyphs which is undesirable.
Has anyone figured out how to achieve this or if it’s even possible?
line_cap, line_join, etc only apply to lines. So for instance, the outline *around* a vbar, or the lines created with the Line glyph itself. There is nothing built into bokeh to generate quads, rects, or vbar/hbar with rounded ends. What might work is to use the "segment" glyph method. That draws line segments, so line_cap applies. You could give it a very thick line_width, and that might approximate the image you've shown. Otherwise, you could create a custom renderer extension to od this kind of specialized glyph, or submit a feature requests in the GH issue tracker.
I'm trying to emulate the glyphs Google uses to display Popular times in Google Maps for another application.
Looking through the Bokeh documentation I see there are two attributes, line_cap, and line_join. First, I don't know how to get the vbar element from a bar chart so I've been creating a vbar object from the plotting module.
The passing in line_cap='round' doesn't seem to have an effect for the vbar object, and the line_join will round both the top and the bottom of the bar glyphs which is undesirable.
Has anyone figured out how to achieve this or if it's even possible?