Look up a Vega scale by name (e.g. 'x', 'y', 'color').
Returns undefined if the scale doesn't exist. The scale's
domain() provides the rendered domain in the order Vega uses
to lay out marks — used by the adapter to align data ordering with
the SVG DOM order so MAIDR's index-based highlighting matches the
visible chart.
OptionalgetSerialise the view's state. The adapter uses it for one thing only: enumerating the names of every registered dataset, so it can reach pipelines it cannot address by a name it derived.
Two details of the real signature are easy to get wrong, and both fail
silently — see getViewDatasetNames:
data is a predicate, not a boolean. Vega throws
options.data is not a function when handed true.Optional because the adapter must tolerate a view that predates it or a host that stubs only part of the API.
Minimal subset of a Vega
Viewthat the adapter needs at runtime.The compiled view exposes processed datasets (post-transform / aggregate) via VegaView.data, which is the most accurate source for chart data extraction.
VegaView.runAsync is used by the adapter to wait for the first render frame to complete, which guarantees the SVG element exists in the container before MAIDR tries to mount on it.