HoverTool properties: show_arrow=False, attachment='vertical' doesn't work properly...

… as the arrow is still shown.

show_arrow=False, attachment=‘horizontal’ works as expected.

Bokeh bug or am I doing something wrong?

Sample demonstrating issue:

···

Demonstrates HoverTool with properties: show_arrow=False, attachment=‘vertical’

doesn’t work properly – as arrow is still shown

from bokeh.plotting import figure, output_file, save
from bokeh.models import HoverTool, ColumnDataSource
from bokeh.layouts import gridplot

data = {‘x’:range(10),
‘y0’:range(10),
‘y1’:range(10)[::-1],
}
source = ColumnDataSource(data=data)

fig = figure(tools=[‘crosshair’])
fig.tools[0].dimensions = ‘height’

plots =
plots.append( fig.line(x=‘x’,y=‘y0’, name=“first”, source=source) )
plots.append( fig.line(x=‘x’,y=‘y1’, name=“second”, source=source) )

ATTACHMENT=‘vertical’ # always shows arrow, regardless of value of show_arrow
#ATTACHMENT=‘horizontal’ # works OK with show_arrow = True/False

TOOLTIPS = [ (“x”, “~x"), ("y", "~y”) ]
fig.add_tools( HoverTool(
mode=‘vline’,
line_policy=‘interp’,
show_arrow=False,
attachment=ATTACHMENT,
renderers=[plots[0]],
names=[plots[0].name],
tooltips=dict( [(‘name’,plots[0].name)]+TOOLTIPS ),
)
)

fig.add_tools( HoverTool(
mode=‘vline’,
line_policy=‘interp’,
show_arrow=True,
attachment=ATTACHMENT,
renderers=[plots[1]],
names=[plots[1].name],
tooltips=dict( [(‘name’,plots[1].name)]+TOOLTIPS ),
)
)

grid = gridplot([[fig]])
output_file( ‘tooltips.html’ )
save( grid )

``

Hi,

Sorry for the delayed response. Getting hard to keep up with the Mailing list. This definitely seems like a bug (hopefully a simple one to fix). Can you make a GitHub issue with this information?

Thanks,

Bryan

···

On Mar 26, 2017, at 19:16, Albert Chau <[email protected]> wrote:

... as the arrow is still shown.

show_arrow=False, attachment='horizontal' works as expected.

Bokeh bug or am I doing something wrong?

Sample demonstrating issue:
#
# Demonstrates HoverTool with properties: show_arrow=False, attachment='vertical'
# doesn't work properly -- as arrow is still shown
#

from bokeh.plotting import figure, output_file, save
from bokeh.models import HoverTool, ColumnDataSource
from bokeh.layouts import gridplot

data = {'x':range(10),
        'y0':range(10),
        'y1':range(10)[::-1],
        }
source = ColumnDataSource(data=data)

fig = figure(tools=['crosshair'])
fig.tools[0].dimensions = 'height'

plots =
plots.append( fig.line(x='x',y='y0', name="first", source=source) )
plots.append( fig.line(x='x',y='y1', name="second", source=source) )

ATTACHMENT='vertical' # always shows arrow, regardless of value of show_arrow
#ATTACHMENT='horizontal' # works OK with show_arrow = True/False

TOOLTIPS = [ ("x", "\~x&quot;\), \(&quot;y&quot;, &quot;~y") ]
fig.add_tools( HoverTool(
    mode='vline',
    line_policy='interp',
    show_arrow=False,
    attachment=ATTACHMENT,
    renderers=[plots[0]],
    names=[plots[0].name],
    tooltips=dict( [('name',plots[0].name)]+TOOLTIPS ),
    )
)

fig.add_tools( HoverTool(
    mode='vline',
    line_policy='interp',
    show_arrow=True,
    attachment=ATTACHMENT,
    renderers=[plots[1]],
    names=[plots[1].name],
    tooltips=dict( [('name',plots[1].name)]+TOOLTIPS ),
    )
)

grid = gridplot([[fig]])
output_file( 'tooltips.html' )
save( grid )

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/6bf49872-6da3-4bf5-a620-484cd00abbc7%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.