Skip to content

zoom_to() ​

Set the zoom window of a chart in a running app, R's GC_zoom_to().

Moves the zoom slider of .zoom() without drawing the chart again from Python. With .events(zoom=True), the chart reports the new window as input.<id>_zoom(), with action "set".

Usage ​

python
from geneviewer.shiny import zoom_to

zoom_to(id, range=None, session=None)

Arguments ​

ArgumentTypeDescription
idstrThe output id of the chart, as in output_geneviewer.
rangesequence of two numbers or NoneThe window, as [start, end] in the units of the mode of .zoom(): shares of the clusters ("relative") or base pairs ("absolute"). None shows everything. The range of input.<id>_zoom() can be passed back as it is.
sessionshiny.Session, optionalThe session; by default the current one.

Errors ​

ErrorWhen
ValueErrorWhen id or range is not valid.
RuntimeErrorOutside a Shiny session.