Custom Tooltips in bokehJS

Hi, how to add custom tooltips in Javascript

var custom_tooltips = ?
var custom_hover = new Bokeh.HoverTool({tooltips: custom_tooltips });
plot.add_tools(custom_hover);

Thanks

Try this

var custom_tooltips = [
  ['Value on the x-axis', '@x'],
  ['Value on the y-axis', '@y'],
];

You can look at the Python documentation to get a sense of what is available with BokehJS. For instance, the documentation on custom tooltips shows how to create a custom tooltip using JavaScript.

1 Like