Hello, I am trying to display a tooltip on mouseover for a Circle glyph with a data-based radius using y-axis scaling.
Example:
from bokeh.plotting import ColumnDataSource, figure, show
from bokeh.models import DatetimeTickFormatter
source = ColumnDataSource(data=dict(
x=[0, 10000, 20000, 30000, 40000],
y1=[1, 1, 1, 1, 1],
y2=[2, 2, 2, 2, 2],
y3=[3, 3, 3, 3, 3],
))
p = figure(width=400, height=400, y_range=[0, 4], tooltips=[("example", "value")])
p.xaxis.formatter = DatetimeTickFormatter()
c1 = p.circle('x', 'y1', radius=0.2, radius_dimension='y', source=source, color='firebrick') # no tooltips :(
c2 = p.circle('x', 'y2', radius=2000, radius_dimension='x', source=source)
c3 = p.circle('x', 'y3', size=40, source=source)
show(p)
In the above example:
c1 (red) is the problematic one with no tooltips, and is scaled on data using the y axis.
c2 has tooltips, and is scaled on data using the x axis.
c3 has tooltips, and is scaled on pixels.
I cannot tell if this is a bug or if I am using this tool incorrectly, please let me know what you think! If a bug, perhaps the tooltip mouseover rendering is always scaling off the x dimension instead of y?
Thanks!