Unpack HoverTool tooltips tuple

I have a multi-indexed data source, and I would like to get the index value for each part on hover.

def _create_hover_tools():
    hover = HoverTool(
    return hover

On hover, this returns something like this:
index: (index_a_value,really_long_b_value_that_should_have_own_line,index_c_value)

I would like to be able to index the values of y, and put them on their own line, similar to this idea that doesn’t work:


Thank you for your time.

The built in hover tool formatter does not function in this way, it only show the full column value, as-is. You will have to use a CustomJSHover which will allow you to supply a snippet of JavaScript to pick out sub-parts and format them how you like.

There is also a full example in the repo: