Bevel/Rounded Tops in Bar Charts (bokeh/python)

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?

Example image

Hi,

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.

Thanks,

Bryan

···

On Jan 3, 2017, at 2:51 PM, [email protected] wrote:

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?

Example image

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/6c9e7abf-b98f-42c2-a970-44813a52c19b%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.