How can I make a mosaic/merimekko chart in a Bokeh dashboard?

I am creating a dashboard using Bokeh and I want to create a Merimekko, or alternatively, a mosaic chart to use in the dashboard. I tried looking around but it doesn’t look like Bokeh can make these. Is there any other way I can make and incorporate this chart on my dashboard? Any specific libraries that could be used?

I tried looking around but it doesn’t look like Bokeh can make these

They are stacked, range-filling, variable-width bar charts. Bokeh can draw that sort of chart with vbar or vbar_stack without any question. [1] But you will need to compute the positions and widths and heights of the bars yourself. And as far as I know, that is more or less also the case with all of the other common Python plotting libraries. I am not aware that any of them have this “built in” as single function you could call, or anything like that.


  1. The rect or quad glyphs could also work, but the bar glyphs are probably more ergonomic to use for this use-case. ↩︎