How to create custom hover tool with value mapping
问题 I am trying to create a custom hover tool using which takes the y-value of the plot and maps the value to different value. The code I could come up with so far to achieve this functionality is from bokeh.models import HoverTool import holoviews as hv df = pd.DataFrame( { "zero": [0, 0, 0, 0, 0, 0, 0], "one": [1, 1, 1, 1, 1, 1, 1], "two": [2, 2, 2, 2, 2, 2, 2], } ) mapping = {i: c for i, c in enumerate(df.columns)} def col_mapping(num): return mapping[int(num)] hover = HoverTool(tooltips=[("x"