Drawing
Events
Bindings
Animation
Lasso
Rectangles
Chart
Images
Transitions
Assemblies
Frames
N-Dimensional Frames
N-Dimensional Scatter Plot
Network Explorer
Array explorer
Color chooser
Opacity Sliders
Edit polygon
Vector Field

This is an example page for the jp_doodle package.

jp_doodle makes implementing special purpose interactive visualizations easy.

Quick references: Javascript API; Python API.

Miscellaneous Demos: Image detail viewer..

These example pages use stand alone Javascript, but the code used to implement them can be transliterated to Python and implemented using Jupyter widgets (modulo some subtleties).
Please see the Jupyter notebooks in the package for additional discussion and documentation.
Please use Binder to easily run the Jupyter notebooks of the package.

Bindings

Canvases can respond to mouse events. The mouse events can be associated to the whole canvas or to named elements in the canvas.

In this illustration a different click event handler attaches to each text area to change the text areas in different ways for 5 seconds.

Code

Discussion

Event handlers may be attached globally to the whole canvas or locally to an object. The example above associates a local event handler to a named object for a given event type using

element.on_canvas_event(event_type, handler_function, object_name);

The name for a named object occurring under an event is bound to the event as event.canvas_name and the properties of the object are bound to the event as event.object_info even if the event is handled by a global event handler. Only the top object under an event is bound to the event -- obscured objects below do not respond to the event.

Objects with no assigned unique name cannot bind events individually and the object information for unnamed artifacts under an event are not bound to the event.