Multiline axis label with Categorical Axis in Bokeh

I’ve large categorical labels on the y-axis, I need to move them in multiple lines, is it possible with the latest version of bokeh?

I have seen @p-himik’s answer

It seems a bit complex, Is there any other workaround? I mean show fewer characters but on hover, we can display all the text or anything like that? Or @p-himik can you further explain the answer so that I can work on that.

There are no workarounds that I know of.

You mean the custom Axis class? I can’t really add anything to that if you don’t have any specific questions. Walk through the Axis source code in bokehjs, figure out what needs to be changed to support some kind of text wrapping, implement it in a custom subclass, use that subclass in a custom model as described here:

This is certainly possible, and probably the simplest/easiest thing to do at present. A custom axis extension would be a very non-trivial undertaking. Information about how to set up hover tools is in the User’s Guide:

I thought the OP meant hovering over the axes’ labels - and that’s not possible now, right?

Oh, yes if that is what was meant, then no it is not currently possible. It was not obvious to me the question was not about the standard hover tool over the heatmap cells.

Thanks for the response,

@p-himik yes, you get it right. I was referring to, hover on Axis Labels.

I will look into the custom subclass technique.