I have a simple graph of X-Y data points. I want my Bokeh figure to show me the integer value of each datapoint when I hover over it. I am close to getting what I want but when I hover over the data point, it shows a float and then higher up, it uses scientific notation. Is there a way to have the hover tool only return the integer values of X and Y and not use scientific notation?
Here is some example code:
from bokeh.plotting import *
from bokeh.models import HoverTool
x = range(1,101)
y = [i*i for i in x]
TOOLS = "pan,wheel_zoom,box_zoom,reset,save,box_select, hover"
p = figure(x_axis_label = "Days",
y_axis_label = "Return",
tools=TOOLS)
p.circle(x, y)
#adjust what information you get when you hover over it
hover = p.select(dict(type=HoverTool))
hover.tooltips = [
("Days", "$x"),
("Return", "$y"),
]
show(VBox(p))