Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ help:
' make check-full run JS, Rust, and ABI gates too' \
' make check-browser run browser smokes (set CHROMIUM=/path/to/chrome)' \
' make check-conformance run accessibility + Chromium/Firefox/WebKit conformance' \
' make check-docs run documentation examples' \
' make check-docs run docs tests, quickstart, and quality hooks' \
' make check-examples run canonical API examples and Reflex asset registry checks' \
' make check-security run standalone HTML safety and client text-sink checks' \
' make check-errors run public error, LOD, and mutation-safety tests' \
Expand Down Expand Up @@ -74,7 +74,7 @@ check-conformance:
node scripts/browser_conformance.mjs

check-docs:
$(PYTHON) scripts/verify_local.py --only examples
$(PYTHON) scripts/verify_local.py --only docs

check-examples:
$(PYTHON) scripts/verify_local.py --only examples
Expand Down
2 changes: 2 additions & 0 deletions docs/api-reference/events-and-callbacks.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ chart = xy.scatter_chart(
- `index` — all selected indices concatenated; use `per_trace` when trace
identity matters.
- `xy(trace_id=0)` — canonical f64 x/y arrays for one selected trace.
- `rows(limit=None)` — exact canonical row dictionaries for selected rows,
optionally capped for large selections.
- `len(selection)` — total selected rows across traces.

Clearing selection delivers an empty `Selection`. `Chart.select_range()`
Expand Down
27 changes: 25 additions & 2 deletions docs/api-reference/figure-methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ code should build charts through components and call the public methods below.
| `chart.figure()` | Build or return the cached internal engine figure. |

In a compatible notebook, leaving a chart as the final cell expression invokes
its display hook automatically. Python callbacks require the live widget or a
framework adapter.
its display hook automatically. In `display="auto"` mode, controlled by
`XY_NOTEBOOK_DISPLAY`, supported notebooks use the live widget and HTML mode
uses `_repr_html_()` as the standalone-HTML path. Python callbacks require the
live widget or a framework adapter.

## HTML and Static Export

Expand Down Expand Up @@ -106,6 +108,27 @@ selection: xy.Selection = chart.select_range(x0, x1, y0, y1, trace_id=None)
Streaming has additional channel and monotonic-line constraints documented in
[Real-time and streaming data](/docs/xy/guides/real-time-and-streaming-data/).

## View and Selection State

~~~python
chart.set_view(ranges, animate=True, history=True)
chart.reset_view(axes=None)
chart.select(range=(x0, x1, y0, y1), history=True)
chart.clear_selection()
state: dict = chart.view_state()
~~~

- `set_view()` applies explicit axis ranges to the live chart state.
- `reset_view()` navigates axes to their home ranges; `axes=None` uses the
configured `reset_axes`.
- `select()` accepts one of `range=`, `polygon=`, or `rows=`. Geometric forms
follow the browser gesture state path; rows resolve kernel-side and are
non-durable.
- `clear_selection()` clears the current selection, including range, polygon,
and row selections.
- `view_state()` returns the last client-confirmed viewport and selection state;
reads after writes are eventually consistent.

## Framework Chrome

~~~python
Expand Down
Loading