Scroll and Zoom

BeakerX's table and plot widgets both support the scroll wheel. For tables, the scroll wheel scrolls vertically. For plots, the scroll wheel zooms. However, for the notebook as a whole, the scroll wheel also has a meaning, to scroll the notebook. So there's an ambiguity, and the UI needs a way to resolve it and decide where the scroll events go.

BeakerX's approach starts with idea of focus, a widget that would be the target of any user commands. And indeed, in BeakerX when you click on a table or a plot, it gets the focus. This is represented by a green outline around the widget. The outline is styled to match the blue one that Jupyter uses to indicate the current cell.

The widget will keep the focus as long as the mouse remains over it. Feel free to interact with the widget, clicking, scrolling, and zooming away. When you are done and move the mouse elsewhere, the green outline will vanish. Focus is returned to the notebook, and the next scroll event will go to the page, and not to a widget.

This keyless blur is a BeakerX innovation.

Try it with the widgets below:


In [ ]:
import pandas as pd
from beakerx import *

In [ ]:
TableDisplay([{'y1':4, 'm3':2, 'z2':1}, {'m3':4, 'z2':2}])

In [ ]:
pd.read_csv('../resources/data/interest-rates.csv')

In [ ]:
rng = pd.date_range('1/1/2011', periods=1000, freq='H')
ts = pd.Series(np.random.randn(len(rng)), index=rng)
df = pd.DataFrame(ts, columns=['mV'])
SimpleTimePlot(df, ['mV'])