PlotViewport class

The visible x window (trials) of one or more linked TrajectoryPlots, as (first, last) x coordinates; null shows every trial.

Share one between plots, as with their hover notifier, so that zooming or panning one moves them all. The window is kept inside the series (see window); each method takes the series' length for that.

Changing it repaints the plots without rebuilding them.

Inheritance

Constructors

PlotViewport([(double, double)? value])

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
value ↔ (double, double)?
The current value stored in this notifier.
getter/setter pairinherited
zoomed → bool
Whether a part of the series is shown.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
follow(double x, int length) → void
Move the window so that trial x is visible (when zoomed), e.g. to follow playback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pan(double dx, int length) → void
Move the window by dx trials (when zoomed).
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
Show every trial.
show(double first, double last, int length) → void
Show first..last, widened to minSpan around its centre and moved inside the series; the whole series resets to null.
toString() → String
A string representation of this object.
inherited
window(int length) → (double, double)
The visible window of a series of length.
zoom(double factor, double anchor, int length) → void
Scale the window by factor (< 1 zooms in) about the trial anchor, which stays where it is on screen.

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

all(int length) → (double, double)
Every trial of a series of length.
resolve((double, double)? w, int length) → (double, double)
w moved inside a series of length (the whole series when w is null or at least as wide).

Constants

minSpan → const double
The narrowest window, in trials (or the whole series if shorter).