bqplot: tooltip on hover can't be removed
Describe the bug It looks like the tooltip-on-hover feature for scatter marks is always activated, even when we don’t want it.
To Reproduce With a notebook consisting of the following code:
import numpy as np
from bqplot import pyplot as plt
import bqplot
n = 200
x = np.linspace(0.0, 10.0, n)
y = np.cumsum(np.random.randn(n)*10).astype(int)
fig2 = plt.figure( title='Line Chart')
np.random.seed(0)
p = plt.scatter(x, y)
fig2.layout.width = 'auto'
fig2.layout.height = 'auto'
fig2.layout.min_height = '300px' # so it shows nicely in the notebook
fig2
p.interactions = {'click': 'select'}
p.selected_style = {'opacity': 1.0, 'fill': 'DarkOrange', 'stroke': 'Red'}
p.unselected_style = {'opacity': 0.5}
p.tooltip = bqplot.Tooltip(fields=['x', 'y'], formats=['', '.2f'])
We can see that the tooltip on hover works, even though we didn’t specify it in the interactions. For it to work we should have:
p.interactions = {'click': 'select', 'hover': 'tooltip'}
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (16 by maintainers)
Sure, PR coming 😃