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
| Argument | Type | Description |
|---|---|---|
id | str | The output id of the chart, as in output_geneviewer. |
range | sequence of two numbers or None | The 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. |
session | shiny.Session, optional | The session; by default the current one. |
Errors
| Error | When |
|---|---|
ValueError | When id or range is not valid. |
RuntimeError | Outside a Shiny session. |
